TFSBuild.exe是从命令行启动TFS build的方法。TFSBuild.exe没有指明如何指定Git提交Id (提交的散列)。
TFSBuild.exe讨论了/getOption:Custom选项,当使用该选项时,让我们通过使用/customGetVersion选项指定更改集或标签标识符来指定构建所基于的更改集或标签。对于标签,您可以从"L“开始。对于更改集,您可以从"C“开始。
然而,似乎没有任何关于如何指定Git commit-id的文档。
发布于 2014-11-21 03:19:50
使用"Label“语法指定git commit-id,但在提交ID前添加"G:ref:”。如下所示: /customGetVersion:LG:ref:
完整语法:
TFSBuild start teamProjectCollectionUrl teamProject definitionName /queue /getOption:Custom /customGetVersion:LG:ref:<hash>
示例用法:
TFSBuild start http://gitsourceserver:8080/tfs/MyCompany MyTeamProject MyBuildDefinition /queue /getOption:Custom /customGetVersion:LG:ref:0c9cc3ce
https://stackoverflow.com/questions/27053557
复制