Jaigene Kang
Jaigene Kang

Reputation: 164

Getting the "Branch" Directory Name when using SVN in Teamcity

Is there anything similar to %teamcity.build.branch% when using SVN? Or even the full URI for the checked out SVN directories?

I have a project setup as follows:

ProjectA
-- trunk/
-- release/
-- tags/
----build.x.x.x

The VCS Root is http://svnhost/svn/repo/ProjectA and then I add Checkout Rules per build config -- e.g. +/trunk=>.

Is there anyway to access the relative path, full url, etc to parse? For example, if this was a working directory, svn info would give the information I need.

Basically, I want to append part of the folder name to the version number, e.g. #.#.#.#-trunk or #.#.#.#-release or #.#.#.#-tag

Upvotes: 0

Views: 118

Answers (1)

Biswajit_86
Biswajit_86

Reputation: 3739

Define a variable in the target, say "folder.name" and change the "VCS checkout rule" to

+:%folder.name% -> whatever

You can now use this variable folder name in your versioning and tagging operations as well

Upvotes: 1

Related Questions