How do I use Team City VCS Labeling in conjunction with an ANT script that performs an SVN commit?


we are in the process of moving our build environment from Ant/SourceSafe TO Ant/TeamCity/SVN.  One of the steps in our Ant scripts is to update the software version string in one of our .java files and commit the updated .java file into version control.  This Ant script is run in my TeamCity project target.  I am also using the same TeamCity project target to automatically perform VCS labelling.  The problem is that TeamCity creates an SVN tag that contains the original copy of the .java file that it checked out rather than the updated .java file that my Ant script committed.  This results in the SVN tag containing a .java file with a version string that does not correspond with the SVN tag itself.

I understand why TeamCity does this and that in most cases this is good (e.g. it provides the ability to tag/label files based upon a moment in time if the build is successful without including check-ins by developers that happened after the build started and before the build completed successfully).  The only thing we thought of to try was to have a separate TeamCity target that changes and commits the version string in our .java file sepaeretely from the TeamCity target that builds and labels.  How do other teams get around this situation?


1 comment
Comment actions Permalink

If your build commits something to version control, probably the same build should tag sources instead of TeamCity.


Please sign in to leave a comment.