Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
689 views
in Technique[技术] by (71.8m points)

semantic versioning - When using GitVersion in TeamCity, how do I get it to include build metadata in the TC Build number

I've followed the GitVersion instructions for TeamCity and what that gives me is a build number like this:

enter image description here

This is nearly perfect, except that occasionally (for example if I re-run the build manually), GitVersion computes the exact same build number so I get multiple builds with the same build number, like this:
enter image description here

What I want to happen is to have an auto-incrementing build number in the metadata, like this: #0.1.0-alpha.6+1, #0.1.0-alpha.6+2, etc.

I know this must be possible, because the GitVersion project shows it in a screen shot right on GitHub: enter image description here

I found mention of a setting update-build-number in the GitVersion docs, and I set that to true, but it makes no difference. How do I make GitVersion add that build metadata?

question from:https://stackoverflow.com/questions/66053505/when-using-gitversion-in-teamcity-how-do-i-get-it-to-include-build-metadata-in

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...