|
2 | 2 | ## Basic Usage
|
3 | 3 | 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.
|
4 | 4 |
|
5 |
| -## Using GiVersion with the MSBuild Task NuGet Package |
| 5 | +## Using GitVersion with the MSBuild Task NuGet Package |
6 | 6 | 1. Add the [GitVersionTask](https://www.nuget.org/packages/GitVersionTask/) NuGet Package to your projects.
|
7 | 7 |
|
8 | 8 | See [MSBuild Task](http://gitversion.readthedocs.org/en/latest/usage/#msbuild-task) for further instructions how to use the MS Build Task.
|
9 | 9 |
|
10 |
| -## Using the GitVersion with the Command Line build step |
| 10 | +## Using GitVersion with the Command Line build step |
11 | 11 | 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.
|
12 | 12 | 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` |
| 13 | +3. Set the Tool parameter to `<pathToGitVersion>\GitVersion.exe`. |
| 14 | +4. Set the Arguments parameter to `/output buildserver /nofetch`. |
15 | 15 | 5. If you want the GitVersionTask to update AssemblyInfo files add `updateAssemblyInfo true` to the Arguments parameter.
|
16 | 16 |
|
17 |
| -## Using the GitVersion with the custom build step |
| 17 | +## Using the custom GitVersion build step |
18 | 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) |
| 19 | +1. Install the `tfx` command line tool as shown [here](https://github.com/Microsoft/tfs-cli/blob/master/docs/buildtasks.md). |
20 | 20 | 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 |
| 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 | 22 | 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 |
| 23 | +5. It should successfully install. |
24 | 24 |
|
25 | 25 | ### Using the GitVersion VSO Build Step
|
26 | 26 | 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.
|
|
0 commit comments