开发者

How to get branch specific SVN revision numbers in TeamCity

I have multiple svn roots configured in TeamCity. They all point to the same repository, but different paths (branches). All branches return the same value for revision. I want the branch specific revision numbers.

Here is an excerpt from the build log after I've dumped all the defined properties:

v开发者_如何学Gocsroot.3_0_11__SP6_.url = https://svn.devlan.local/Enigma/branch/release/3.0.11/
vcsroot.trunk.url = https://svn.devlan.local/Enigma/trunk/
system.build.vcs.number.trunk = 9602
system.build.vcs.number.3_0_11__SP6_ = 9602

Clearly different locations in the svn tree, but same revision number.

How can I get branch specific revision numbers?


You just need to make multiple VCS Roots in your Administration settings and apply each one to the appropriate build. For instance, if

  • svn://196.168.0.1/software

is your SVN repository, then you might have VCS Roots for each of the following projects:

  • svn://196.168.0.1/software/agent/trunk
  • svn://196.168.0.1/software/server/trunk
  • svn://196.168.0.1/software/database/trunk

"Branch-specific" revisions is sort of a misnomer, but each of those VCS Roots will use the branch's most recent repository revision number in its build.vcs.number.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜