0

I am currently working in TFS 2013 and am trying to implement a part of build definition where it would create a Shelveset from jars or other files that are already present in the VM's directory.The problem is that in order to do an add there has to be a mapped directory. If the file is the same after a tf add then it does not get detected as pending changes. Pretty much the benefit would be that users can pull the shelveset and get those files in their local workspace which are needed to run some automation. So the sequence is as follows

Add Jar Files: tf "add " + """" + BuildDirectory + "\" + ProjectBaseDir + "\" + "\lib*." + """" + " /noignore" + " /recursive" + " /noprompt" + " /lock:None" Add other files: tf "add " + ".*" + " /noignore" + " /recursive" + " /noprompt" Shelve changes: tf "shelve /move /replace /noprompt " + """" + ShelvesetName + """"

I apologize if its a little confusing. Does anyone have any ideas or workarounds using tfs?

4

1 回答 1

0

根据您的信息,假设您想将构建结果的某些内容添加到搁置集,然后在本地工作区中拉取或复制搁置集以运行一些自动化。

您可以InvokeProcess在构建过程模板中添加活动以执行 xcopy 命令行以将文件从源复制到目标。请参阅本文中的示例以获取更多详细信息:自定义 Team Build 2010 – 使用更复杂的参数

或升级到 TFS 2015 以使用 Vnext Build

于 2016-02-02T14:07:20.957 回答