简体   繁体   English

如何获取TFS 2013 Build定义以压缩生成的输出?

[英]How do I get TFS 2013 Build definition to zip the build output?

I am using VS2013 and TFS2013. 我正在使用VS2013和TFS2013。 In TFS, I am using the new "default" TfvcTemplate12.xaml template. 在TFS中,我正在使用新的“默认” TfvcTemplate12.xaml模板。

In my build definition, in the Test-> Post-Build Script Arguments (or Path if I have to save the command in a file), what PowerShell script do I enter to get it to Zip the entire build output and drop that zip file onto a share drive? 在我的构建定义中,在“测试”->“构建后脚本参数”(或“路径”(如果必须将命令保存在文件中))中,输入什么PowerShell脚本以使其压缩整个构建输出并删除该zip文件到共享驱动器上? I want to avoid manipulating the XAML workflow. 我想避免操纵XAML工作流。

I know the basic PS script to zip a folder is.... 我知道用于压缩文件夹的基本PS脚本是...。

Get-Childitem C:\\source -Recurse | Write-Zip -IncludeEmptyDirectories -OutputPath C:\\stage\\zomeZipFile.zip

But I don't know if this is the right approach, and if so, what to replace the source and stage parameters with. 但是我不知道这是否是正确的方法,如果是,那么用什么替换源参数和舞台参数。

Our code migration system requires us to have 1 ZIP file with everything in it for deployment. 我们的代码迁移系统要求我们拥有1个ZIP文件,其中包含用于部署的所有文件。

You need to add the PowerShell to the post-test script location. 您需要将PowerShell添加到测试后脚本位置。

https://msdn.microsoft.com/en-us/library/hh850448.aspx https://msdn.microsoft.com/en-us/library/hh850448.aspx

MSDN had a comprehensive list of the cracks that you have access to when it is executing. MSDN包含执行时可以访问的裂缝的完整列表。

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

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