I have local TFS2012. How can I detect, If was been any changes in Project or not? I need this variable to decide in powershell script: deploy package on not.
How detect on tfs if project doesn't change
71 views Asked by user3201751 At
3
There are 3 answers
0
On
I'm working on only generating nuget packages for changed projects so I needed to figure out changed files. Once you have the changed files you can search for projects that contain (or are) those changed items (files/folders):
. "$tf" diff . /noprompt /format:brief /version:D"$($lastBuildstartTime.ToString())"~W /recursive |? {$_ -like "only" -or $_ -like "differ"}
Hope that helps!
Programmatically you can get the history of the project root using tf.exe:
Note: the '
.
' is just using the current location mapped to a TFS location, you would probably use$/Some/branch/location
instead of '.
'The output will need to be parsed to get the date field
you can get the full set of tf history options by running tf history /?
another way would be to try and get latest, if you get anything there was a change:
returns: