I want to create create a label (tag) in the SVN with a file's version.
I'm already renaming the artifact by getting the file version of the main executable produced by the build. Such as: MyInstaller-1.2.3.1.exe
. Now I want to create a tag in the SVN called /tags/1.2.3.1
. I couldn't find a way to set such a thing in the labeling pattern.
Currently my labeling is just "%system.build.number%"
Any idea about how to do this?
I'm using TeamCity Professional Version 4.5.3 (build 9035)
If you're using Ant, maybe you should get SVNAnt.jar and try this.
The convention that I've seen for labeling is major.minor.svn (and .build if you're using CI).
You can include SVN revision number to your TeamCity build number. For your build number pattern in Teamcity, use something like {build.vcs.number.1} in the build number pattern field.
After that build number will contain actual SVN revision number, and your labeling pattern %system.build.number% will contain it as well.
Hope this helps, KIR
As someone mentioned, you can output the build number during the execution of the build script, and teamcity will use that output to label the build. For example, I label my build with the same version that I put into AssemblyInfo.cs. Part of that version (Major, Minor) is actually in the file already, the other part (Build, Revision) gets added during the build.
From my msbuild script:
you just output the version during the build the format is
##teamcity[buildNumber '<buildnum>']