Reputation: 1145
Say, I have this branch specification: +:refs/heads/* and I want to get branch name in build.xml. Any parameters like ${vcsroot.branch} return string env.branch.
Upvotes: 1
Views: 1480
Reputation: 5468
You want to add an Environment Variable called something like env.branch
then set its value to %teamcity.build.branch%
then in your build.xml
you can read it in using something like:
<property environment="env"/>
${env.branch}
Assuming this is ant
for the last part.
Upvotes: 4
Reputation: 2211
Branch related parameters are described in TeamCity documentation: http://confluence.jetbrains.com/display/TCD8/Predefined+Build+Parameters#PredefinedBuildParameters-BranchRelatedParameters
Upvotes: 0