【问题标题】:Can teamcity be made to build the latest tag in a git branch?可以让 teamcity 在 git 分支中构建最新的标签吗?
【发布时间】:2013-03-26 21:42:17
【问题描述】:

我知道一年前有人问过这个问题 here 并且有一个手动答案,但我想知道是否可以使用类似 git describe 的东西来获取最新标签,然后使用而不是以前给出的更多手动方法?

【问题讨论】:

    标签: git continuous-integration teamcity


    【解决方案1】:

    正如我在“How to get latest tag name?”中提到的,使用git describe 足以获取最后一个标签:

    git describe --abbrev=0         # shows only annotated tags.
    git describe --abbrev=0 --tags  # includes lightweight (non-annotated) tags.
    

    如果 TeamCity 可以调用第一个作业,该作业设置了用于第二个作业的 Source Control parameters 的属性,则可以使用该属性和最新标记作为要构建的值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-16
      • 2013-12-19
      • 2014-06-18
      • 2014-04-09
      • 2019-09-02
      • 2015-11-10
      • 1970-01-01
      • 2011-10-16
      相关资源
      最近更新 更多