How can I label my build with revision number and not the GUID (in TeamCity)?

后端 未结 6 734
忘了有多久
忘了有多久 2021-01-30 11:15

I am trying to do \"continuous integration\" with TeamCity. I would like to label my builds in a incremental way and the GUID provided by the VCS is not as usefull as a simple i

6条回答
  •  太阳男子
    2021-01-30 11:33

    When I used to use Subversion I used to do something similar in TeamCity. The format was:

    {Major}.{Minor}.{TeamCity Build No.}.{Subversion Revision No.}
    

    This allowed me to look at an assembly and see which build it came from on TeamCity and the revision number from subversion.

    I have now moved to Git which has put me in the same situation as you. After playing with various ideas I have come to the conclusion that I don't actually need the revision, the build is good enough. Because TeamCity is such a powerful tool, all you need is the build number, given the build number you can look at the build history and determine the revision from that.

    {Major}.{Minor}.{Macro}.{TeamCity Build No.}
    

    Additionally you can get TeamCity to label your repository with the build number allowing you to look up a given build in your source control.

提交回复
热议问题