【发布时间】:2013-03-26 21:42:17
【问题描述】:
我知道一年前有人问过这个问题 here 并且有一个手动答案,但我想知道是否可以使用类似 git describe 的东西来获取最新标签,然后使用而不是以前给出的更多手动方法?
【问题讨论】:
标签: git continuous-integration teamcity
我知道一年前有人问过这个问题 here 并且有一个手动答案,但我想知道是否可以使用类似 git describe 的东西来获取最新标签,然后使用而不是以前给出的更多手动方法?
【问题讨论】:
标签: git continuous-integration teamcity
正如我在“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 的属性,则可以使用该属性和最新标记作为要构建的值。
【讨论】: