I'm writing a script that will run a build only if there is a change in source code. I need to know whether there is a change since the build last ran. This used to work because the folder would not be deleted, so it was easy to determine whether there was a change, but now everything is deleted everytime the build is run. I thought about using the TFS TF history command to query the last changeset or the last two changesets, but have had issues parsing just the changeset number from the output. I also considered using the changeset command. Is there any command-line parameter that I can use to answer the question, has there been a change since either a date, or a changeset number?
To the latest changeset number without local workspace, please use this command:
tf history /collection:"http://server:8080/tfs/Collection" "$/Project" /recursive /stopafter:1 /noprompt /login:domain\user,password
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With