1
我知道這個問題在一年前被問到here,並且有一個手動的答案,但我想知道是否可以使用類似git describe
的東西來獲取最新的標籤,然後使用而不是更手動的方法之前給過?teamcity可以在git分支中構建最新的標籤嗎?
我知道這個問題在一年前被問到here,並且有一個手動的答案,但我想知道是否可以使用類似git describe
的東西來獲取最新的標籤,然後使用而不是更手動的方法之前給過?teamcity可以在git分支中構建最新的標籤嗎?
正如我提到的「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性質的第一份工作,您可以將該屬性與最新的標記一起用作構建的值。