简体   繁体   English

TFS为发行版创建构建脚本

[英]TFS Creating Build script for releases

I want to be able to set up a semi automatic Build script to check out a specific commit from our TFS server to a non generic folder to then cause the code to be built and packaged to enable a release. 我希望能够设置一个半自动的Build脚本,以将特定的提交从我们的TFS服务器中检出到非通用文件夹,然后使代码被构建和打包以启用发布。

I understand how to use the command line, and can script it fine, but its how to create a temporary workspace that will not interfere with the existing workspace on the machine to check the code out into. 我了解如何使用命令行,并且可以对其进行脚本编写,但是它如何创建临时工作区,该工作区不会干扰机器上的现有工作区以将代码签出。

I will have to research how to build the solution as well from the commandline but that may not be as hard as this... 我将不得不研究如何从命令行构建解决方案,但是这可能不那么困难...

You can use the command line tool tf.exe to create a new workspace eg: 您可以使用命令行工具tf.exe创建新的工作空间,例如:

tf workspace /new workspace_name`;username /collection:http://myserver:8080/tfs/DefaultCollection

You can get work folder mappings by using a template when creating the new workspace. 创建新的工作空间时,可以使用模板获取工作文件夹映射。 See the /template parameter on tf workspace . 请参阅tf workspace上的/template参数。 Or you can use the tf workfold /map command to create work folder mappings for the new workspace. 或者,您可以使用tf workfold /map命令为新工作空间创建工作文件夹映射。 When you're done, use tf workspace /delete to delete the workspace. 完成后,使用tf workspace /delete删除工作区。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM