teamcity - 仅当构建成功时才 checkin 更新程序集版本信息

标签 teamcity assemblyinfo

在我的构建工作流程中,我更改了 AssemblyInfo.cs 中的程序集版本信息。仅当构建成功时,如何才能在构建过程结束时 checkin 更改?

最佳答案

  1. 在 TeamCity 项目中创建新的构建配置。
  2. 在新的构建配置中,转到“构建步骤”并添加“构建功能”,然后选择“AssemblyInfo Patcher”。

    AssemblyInfo Patcher build feature allows to set a build number to an assembly automatically, without having to patch AssemblyInfo.cs files manually. When adding this build feature you need only to specify version format.

  3. 添加另一个构建步骤,该步骤将在当前工作区中提交挂起的更改 - Checkin Command .

  4. 在您的主项目中,转到“构建触发器”

"Build triggers are used to add builds to the queue either when an event occurs (like a VCS check-in) or periodically with some configurable interval."

在构建触发中添加新触发器 - “完成构建触发器”

Finished Build Trigger will add a build to the queue after a build finishes in the selected configuration.

在“构建配置”中,选择之前创建的构建项目(步骤 1),并且不要忘记选中“仅在成功构建后触发”复选框。

关于teamcity - 仅当构建成功时才 checkin 更新程序集版本信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18954504/

相关文章:

c# - Selenium 错误 - 对远程 WebDriver 的 HTTP 请求在 60 秒后超时

mercurial - 有人使用 TeamCity、FinalBuilder 和 Mercurial (Kiln) 管理他们的持续集成吗?

c# - app.manifest 和 assemblyInfo.cs 版本号以及是否需要 app.manifest?

c# - Team City 阻止构建步骤运行

configuration - 如何获取TeamCity中项目依赖的checkout目录?

.net - 如何管理存储在SVN中的AssemblyInfo.cs以及每次构建时的更改

sql - SQL Azure 中的内部版本号

java - 为 TeamCity 配置 Java 版本

c# - 在 win 7 上的 visual studio 2012 中找不到 assemblyInfo.cd 的构建错误