Quantcast
Channel: MSBuild Extension Pack
Viewing all articles
Browse latest Browse all 1211

New Post: Checkout, Add, Checkin

$
0
0

This forum is not very useful, I'm afraid.  

Nonetheless, here's how I solved this problem:

<!-- Check out the binaries from TFS--><MSBuild.ExtensionPack.VisualStudio.TfsSourceTaskAction="Checkout"ItemPath="$(BinaryPath)"Version="2010"WorkingDirectory="$(SolutionRoot)"/><!-- Add the files from the drop folder to the Build Agent working folder.  --><CopySourceFiles="@(FilesToAdd)"DestinationFolder="$(MyAbsolutePathProperty)$(WorkSpacePath)"OverwriteReadOnlyFiles="true"/><!-- Check in the updated binaries to TFS --><ExecCommand="$(TF) checkin $(BinaryPath) /comment:"***NO_CI***" /bypass /noprompt /recursive /override:"Auto-Build: Version Update" "WorkingDirectory="$(SolutionRoot)"/>

$(BinaryPath) and $(SolutionRoot) are passed in from the calling workflow.  @(FilesToAdd) is the enumeration of the files in the Drop Folder (also passed in from the workflow).  I used the /bypass parameter of the tf.exe command to override the gated builds that would have otherwise been triggered by this check-in.  It's also the reason I didn't use the Extensions checkin command.  As a matter of fact, I could easily have done this whole thing without the extensions altogether.

If anyone wants the whole script, just message me.

jr

 


Viewing all articles
Browse latest Browse all 1211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>