TeamCity,如何获取已编辑文件的名称 [英] TeamCity, how to get names of the files edited

查看:26
本文介绍了TeamCity,如何获取已编辑文件的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 TeamCity,而且我是新手.我已经向 TeamCity 添加了一个构建配置,并创建了一个 VCS 根来附加到它.

I am using TeamCity and I am new to it. I have added a Build Configuration to the TeamCity and I created one VCS root to attach to it.

但是,我的项目有一个特殊要求,即检测在 VCS 根位置更改的特定文件并在构建步骤中使用该文件.我确信这可以在 TeamCity 中完成,但我不知道如何进行.

However, my project have a special requirement to detect a particular file that was changed in the VCS root location and use that file in build step. I am sure this could be done in TeamCity, I am not able to figure out how.

有什么帮助吗?谢谢,

推荐答案

为了更改文件的名称,我就是这样做的.感谢山姆琼斯.

To get the names of the files changed this is what I did. Thanks to Sam Jones.

我使用了 System.TeamCity.build.changedFiles.file 变量,如下所示.

I used System.TeamCity.build.changedFiles.file variable as follows.

  1. 添加命令行构建步骤
  2. 选择作为自定义脚本运行
  3. 在脚本框中添加脚本copy "%system.teamcity.build.changedFiles.file%" changelog.txt.

您将在 changelog.txt 文件中获得 此链接.

You will get the changes in changelog.txt file in the format specified on this link.

注意: teamcity.build.changedFiles.file 不起作用.您需要使用 system.teamcity.build.changedFiles.file

NOTE: teamcity.build.changedFiles.file does not work. You need to use system.teamcity.build.changedFiles.file

这篇关于TeamCity,如何获取已编辑文件的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆