Skip to content

Commit f62732f

Browse files
committed
Merge pull request #838 from DanielRose/teamcity-branch-variable
Fix docs to state that Git_Branch is an environment variable for TeamCity
2 parents 956d0cb + e14d529 commit f62732f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/build-server-support/build-server/teamcity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ TeamCity has support for meta-runners which allow custom tasks. There is a GitVe
2020
When running in TeamCIty you have two options, run using **agent checkout** or use dynamic repositories.
2121

2222
### Agent checkout
23-
For GitVersion to pick up pull requests properly you need to promote the `%teamcity.build.vcs.branch.{configurationid}%` variable to a system variable called `Git_Branch`
23+
For GitVersion to pick up pull requests properly you need to promote the `%teamcity.build.vcs.branch.{configurationid}%` variable to an environment variable called `Git_Branch`
2424

25-
Just go to your build configuration, Parameters, click Add, Name should be `system.Git_Branch`, value should be `%teamcity.build.vcs.branch.{vcsid}%` where vcsid is your VCS root id. You should get auto completion for this.
25+
Just go to your build configuration, Parameters, click Add, Name should be `env.Git_Branch`, value should be `%teamcity.build.vcs.branch.{vcsid}%` where vcsid is your VCS root id. You should get auto completion for this.
2626

2727
### Dynamic repositories
2828
To use server side checkout, you must use the dynamic repositories feature of GitVersion. Server side checkout sends just the files to the agent and not the actual .git folder. Dynamic repositories will clone your repo into a temp folder and use it to calculate version information.

src/GitVersionCore/BuildServers/TeamCity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static void WriteBranchEnvVariableWarning()
3232
3333
Depending on your authentication and transport setup of your git VCS root things may work. In that case, ignore this warning.
3434
35-
In your TeamCity build configuration, add a parameter called `system.Git_Branch` with value %teamcity.build.vcs.branch.<vcsid>%
35+
In your TeamCity build configuration, add a parameter called `env.Git_Branch` with value %teamcity.build.vcs.branch.<vcsid>%
3636
3737
See http://gitversion.readthedocs.org/en/latest/build-server-support/build-server/teamcity for more info");
3838
}

0 commit comments

Comments
 (0)