Get highest vcs root revision

Answered

Hello!

I have several vcs roots for a project:

root_0 -> svn://MyServer/repository/root0x00/

root_1 -> svn://MyServer/repository/root0x01/

root_2 -> svn://MyServer/repository/root0x02/

I'd like to have a highest revision of all roots in an artifact zip filename. But I can only specify roots revisions separately in build number format editor: %build.vcs.number.root_0%. Single %build.vcs.number% parameter is not available, because there are several vcs roots. I understand that I can concatenate all roots revisions into a single string like "<root_0_rev>.<root_1_rev>.<root_2_rev>, but it looks ugly actually. Is it achievable?

2 comments

Hello,

There is no special logic in TeamCity to determine the highest revision. You can create additional build step (for example command line), determine the highest revision and set TeamCity configuration parameter using service message:
echo "##teamcity[setParameter name='test' value='archive_name']"

You can use %test% parameter in artifact path.

 

1

Please sign in to leave a comment.