I want to use SubWCRev to include the SVN revision number as part of the version number in my project, but we're using TeamCity and it doesn't seem to include the .svn directories when it pulls the source for a new build. Is there any way to force TeamCity to leave those directories in place for the build? We're currently using TeamCity 6, but upgrading to 7 may be possible if it's necessary.
Asked
Active
Viewed 1,103 times
2 Answers
2
Just use agent checkout mode:
Agent-side checkout ... provides the ability to access version control-specific directories (.svn, CVS); that is, the build script can perform VCS operations

Lazy Badger
- 94,711
- 9
- 78
- 110
0
As Lazy Badger noted, you can use agent-side checkout. Also, when build is run in TeamCity even for server-side checkout you can get the revision used to update the sources from "build.vcs.number." build parameters (you can get the exact name using "completion" in the webUI when defining value for a new build parameter.

Yaegor
- 1,771
- 9
- 12
-
Because I'm using a SubWCRev from a prebuild task, getting the number through TeamCity is not really an option because it wouldn't work in builds on the developer machines. I think agent-side checkout is probably the right answer here. – Cory McCarty Feb 24 '12 at 13:59