diff --git a/docs/input/docs/reference/build-servers/index.cshtml b/docs/input/docs/reference/build-servers/index.cshtml index 836e9269fe..e65f96af73 100644 --- a/docs/input/docs/reference/build-servers/index.cshtml +++ b/docs/input/docs/reference/build-servers/index.cshtml @@ -19,27 +19,41 @@ Description: Details on GitVersion's Build Server support @Html.Partial("_ChildPages") -
- When the gitVersion
executable is run with the
- /output buildserver
flag instead of outputting JSON it will
- export variables to the current build server.
-
- For instance if you are running in TeamCity after you run
+ When the gitVersion
executable is run with the
+ /output buildserver
flag instead of outputting JSON, it will
+ export its version variables to the
+ current build server as build-server native variables. For instance if you
+ are running in TeamCity after you run
gitversion /output buildserver
you will have the
%system.GitVersion.SemVer%
variable available for you to use
in the rest of the build configuration.
When running in MSBuild either from the
- MSBuild Task or
- by using the /proj myproject.sln
parameter, GitVersion will
- make the MSBuild variables available in the format
- $(GitVersion_SemVer)`
+ MSBuild Task or by using
+ /proj myproject.sln
parameter, GitVersion will make its
+ version variables available as
+ MSBuild properties in the format $(GitVersion_SemVer)
.
+ When executed within one of the supported build servers mentioned above,
+ GitVersion will also expose the version
+ variables as environment variables, in the format
+ GitVersion_SemVer
(and in some circumstances, as
+ GitVersion.SemVer
).
+
The standard gitversion
executable normalize the branches if
there is a build server detected. This behavior can be disabled with the
diff --git a/docs/input/docs/reference/variables.md b/docs/input/docs/reference/variables.md
index 7c75e5998e..ce81073c36 100644
--- a/docs/input/docs/reference/variables.md
+++ b/docs/input/docs/reference/variables.md
@@ -83,3 +83,10 @@ Each property of the above JSON document is described in the below table.
| `CommitsSinceVersionSourcePadded` | The `CommitsSinceVersionSource` padded with `0` up to 4 digits. |
| `CommitDate` | The ISO-8601 formatted date of the commit identified by `Sha`. |
| `UncommittedChanges` | The number of uncommitted changes present in the repository. |
+
+Depending on how and in which context GitVersion is executed (for instance
+within a [supported build server][build-servers]), the above version variables
+may be exposed automatically as **environment variables** in the format
+`GitVersion_FullSemVer`.
+
+[build-servers]: ./build-servers/