Skip to content

Commit f7286e2

Browse files
committed
Merge pull request #581 from pascalberger/TfsDocImprovements
Restructure headlines & fix some typos in the TFS documentation
2 parents ff04dd7 + 751d212 commit f7286e2

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

docs/more-info/build-server-setup/tfs-build-vnext.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,39 @@
22
## Basic Usage
33
In [Visual Studio Online](https://www.visualstudio.com/) build vNext (the web based build system) you can call GitVersion either using the Command Line build step or install a custom build step. This requires a one-time setup to import the GitVersion task into your VSO instance.
44

5-
## Using GiVersion with the MSBuild Task NuGet Package
5+
## Executing GitVersion
6+
### Using GitVersion with the MSBuild Task NuGet Package
67
1. Add the [GitVersionTask](https://www.nuget.org/packages/GitVersionTask/) NuGet Package to your projects.
78

8-
See [MSBuild Task](http://gitversion.readthedocs.org/en/latest/usage/#msbuild-task) for further instructions how to use the MS Build Task.
9+
See [MSBuild Task](/usage/#msbuild-task) for further instructions how to use the MS Build Task.
910

10-
## Using the GitVersion with the Command Line build step
11+
### Using GitVersion with the Command Line build step
1112
1. Make sure to have GitVersion.exe under version control. There exists also a [Chocolatey package](https://chocolatey.org/packages/GitVersion.Portable) for installing GitVersion.exe on build agents.
1213
2. Add a Command Line build step to your build definition. You'll probably want to drag the task to be at or near the top to ensure it executes before your other build steps.
13-
3. Set the Tool parameter to `<pathToGitVersion>\GitVersion.exe`
14-
4. Set the Arguments parameter to `/output buildserver /nofetch`
14+
3. Set the Tool parameter to `<pathToGitVersion>\GitVersion.exe`.
15+
4. Set the Arguments parameter to `/output buildserver /nofetch`.
1516
5. If you want the GitVersionTask to update AssemblyInfo files add `updateAssemblyInfo true` to the Arguments parameter.
1617

17-
## Using the GitVersion with the custom build step
18-
### Installing/updating the VSO Build Step
19-
1. Install the `tfx` command line tool as shown [here](https://github.com/Microsoft/tfs-cli/blob/master/docs/buildtasks.md)
18+
### Using the custom GitVersion build step
19+
#### Installing/updating the VSO Build Step
20+
1. Install the `tfx` command line tool as shown [here](https://github.com/Microsoft/tfs-cli/blob/master/docs/buildtasks.md).
2021
2. Download the GitVersion VSO build task from the latest release on the [GitVersion releases page](https://github.com/GitTools/GitVersion/releases) and unzip.
21-
3. Run `tfx login` if you haven't yet, make sure to use `https://<server>.visualstudio.com/DefaultCollection` as the URL and provide a personal access token
22+
3. Run `tfx login` if you haven't yet, make sure to use `https://<server>.visualstudio.com/DefaultCollection` as the URL and provide a personal access token.
2223
4. From the directory outside of where you unzipped the task, run `tfx build tasks upload .\GitVersionVsoTask` where GitVersionVsoTask is the directory containing the files.
23-
5. It should successfully install
24+
5. It should successfully install.
2425

25-
### Using the GitVersion VSO Build Step
26+
#### Using the GitVersion VSO Build Step
2627
From a VSO vNext build definition, select "Add a Step" and then in the Build category, choose GitVersion and click Add. You'll probably want to drag the task to be at or near the top to ensure it executes before your other build steps.
2728

2829
If you want the GitVersionTask to update AssemblyInfo files, check the box in the task configuration. For advanced usage, you can pass additional options to the GitVersion exe in the Additional arguments section.
2930

30-
## Using the GitVersion Variables
31-
GitVersion writes build parameters into VSO, so they will automatically be passed to your build scripts to use. It also writes GITVERSION_* environment variables that are available for any subsequent build step.
31+
## Running inside Visual Studio Online
32+
### Using the GitVersion Variables
33+
GitVersion writes build parameters into VSO, so they will automatically be passed to your build scripts to use. It also writes GITVERSION_* environment variables that are available for any subsequent build step.
34+
We output the individual values of the GitVersion version as the build parameter: `GitVersion.*` (Eg: `GitVersion.Major`) if you need access to them in your build script.
35+
See [Variables](/more-info/variables/) for an overview of available variables.
3236

3337
Note that due to [current limitations in VSO](https://github.com/Microsoft/vso-agent-tasks/issues/380) it's currently not possible to set the build version inside of VSO to one of the GITVERSION_* variables.
3438

35-
## Running inside Visual Studio Online
36-
* We output the individual values of the GitVersion version as the build parameter: `GitVersion.*` (Eg: `GitVersion.Major`) if you need access to them in your build script
37-
38-
### Create a NuGet package in VSO
39-
* If you use a command script to build your NuPkg, use `%GITVERSION_NUGETVERSION%` as the version parameter: `nuget.exe pack path\to\my.nuspec -version %GITVERSION_NUGETVERSION%`
39+
## Create a NuGet package in VSO
40+
If you use a Command Line task to build your NuPkg, use `%GITVERSION_NUGETVERSION%` as the version parameter: `nuget.exe pack path\to\my.nuspec -version %GITVERSION_NUGETVERSION%`

0 commit comments

Comments
 (0)