Reputation: 3201
I know that this question was asked here a year ago and there was a manual answer, but I was wondering if it would be possible to use something like git describe
to get the latest tag and then use instead of the more manual approach that was given before?
Upvotes: 1
Views: 956
Reputation: 1330052
As I mention in "How to get latest tag name?", using git describe
can be enough to get the last tag:
git describe --abbrev=0 # shows only annotated tags.
git describe --abbrev=0 --tags # includes lightweight (non-annotated) tags.
If TeamCity can call a first job which set a property used for the Source Control parameters of a second job, you could use that property with the latest tag as a value to build.
Upvotes: 1