From a45f06d142a9001493b484336b97ce5ee63625e9 Mon Sep 17 00:00:00 2001 From: mkoertgen Date: Fri, 26 Aug 2016 11:55:38 +0200 Subject: [PATCH 1/6] Updated to newer pre-release of libgitsharp to see if that could fix #720 cf. https://github.com/GitTools/GitVersion/issues/720#issuecomment-238532783 --- .../GitVersionCore.Tests.csproj | 6 +++--- src/GitVersionCore.Tests/packages.config | 4 ++-- src/GitVersionCore/GitVersionCore.csproj | 6 +++--- src/GitVersionCore/packages.config | 4 ++-- .../GitVersionExe.Tests.csproj | 6 +++--- src/GitVersionExe.Tests/packages.config | 4 ++-- src/GitVersionExe/GitVersionExe.csproj | 15 +++++---------- src/GitVersionExe/packages.config | 4 ++-- .../GitVersionTask.Tests.csproj | 6 +++--- src/GitVersionTask.Tests/packages.config | 4 ++-- src/GitVersionTask/GitVersionTask.csproj | 6 +++--- src/GitVersionTask/packages.config | 4 ++-- 12 files changed, 32 insertions(+), 37 deletions(-) diff --git a/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj b/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj index d6c3ee9ec9..22d42726fa 100644 --- a/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj +++ b/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj @@ -1,6 +1,6 @@  - + Debug @@ -51,7 +51,7 @@ True - ..\packages\LibGit2Sharp.0.23.0-pre20150419160303\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll True @@ -200,7 +200,7 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/src/GitVersionCore.Tests/packages.config b/src/GitVersionCore.Tests/packages.config index 730bf36488..247c6121f1 100644 --- a/src/GitVersionCore.Tests/packages.config +++ b/src/GitVersionCore.Tests/packages.config @@ -4,8 +4,8 @@ - - + + diff --git a/src/GitVersionCore/GitVersionCore.csproj b/src/GitVersionCore/GitVersionCore.csproj index 0208ef28f3..36a6d6240e 100644 --- a/src/GitVersionCore/GitVersionCore.csproj +++ b/src/GitVersionCore/GitVersionCore.csproj @@ -1,6 +1,6 @@  - + Debug @@ -48,7 +48,7 @@ False - ..\packages\LibGit2Sharp.0.23.0-pre20150419160303\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll True @@ -196,7 +196,7 @@ - + diff --git a/src/GitVersionCore/packages.config b/src/GitVersionCore/packages.config index ce519f7f9c..4f0694fdb1 100644 --- a/src/GitVersionCore/packages.config +++ b/src/GitVersionCore/packages.config @@ -4,8 +4,8 @@ - - + + diff --git a/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj b/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj index c1b178c8e0..2c44b44e40 100644 --- a/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj +++ b/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj @@ -1,6 +1,6 @@  - + Debug @@ -44,7 +44,7 @@ True - ..\packages\LibGit2Sharp.0.23.0-pre20150419160303\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll True @@ -144,6 +144,6 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/src/GitVersionExe.Tests/packages.config b/src/GitVersionExe.Tests/packages.config index fbc4933877..8470d43757 100644 --- a/src/GitVersionExe.Tests/packages.config +++ b/src/GitVersionExe.Tests/packages.config @@ -2,8 +2,8 @@ - - + + diff --git a/src/GitVersionExe/GitVersionExe.csproj b/src/GitVersionExe/GitVersionExe.csproj index 6c92543b0e..16f0cbcdc5 100644 --- a/src/GitVersionExe/GitVersionExe.csproj +++ b/src/GitVersionExe/GitVersionExe.csproj @@ -1,6 +1,6 @@  - + Debug AnyCPU @@ -50,7 +50,7 @@ False - ..\packages\LibGit2Sharp.0.23.0-pre20150419160303\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll True @@ -147,21 +147,19 @@ - + - - + - @@ -174,7 +172,6 @@ - @@ -190,7 +187,6 @@ - @@ -214,7 +210,6 @@ - @@ -224,7 +219,7 @@ - + diff --git a/src/GitVersionExe/packages.config b/src/GitVersionExe/packages.config index 3574c719e9..b030308001 100644 --- a/src/GitVersionExe/packages.config +++ b/src/GitVersionExe/packages.config @@ -5,8 +5,8 @@ - - + + \ No newline at end of file diff --git a/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj b/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj index 3bde0520a5..7d81538d2f 100644 --- a/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj +++ b/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj @@ -1,6 +1,6 @@  - + Debug AnyCPU @@ -61,7 +61,7 @@ True - ..\packages\LibGit2Sharp.0.23.0-pre20150419160303\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll True @@ -209,7 +209,7 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/src/GitVersionTask.Tests/packages.config b/src/GitVersionTask.Tests/packages.config index f1eac1ccd9..e642a31c49 100644 --- a/src/GitVersionTask.Tests/packages.config +++ b/src/GitVersionTask.Tests/packages.config @@ -5,8 +5,8 @@ - - + + diff --git a/src/GitVersionTask/GitVersionTask.csproj b/src/GitVersionTask/GitVersionTask.csproj index 07a3bc47cf..ab36f88e56 100644 --- a/src/GitVersionTask/GitVersionTask.csproj +++ b/src/GitVersionTask/GitVersionTask.csproj @@ -1,6 +1,6 @@  - + Debug @@ -44,7 +44,7 @@ True - ..\packages\LibGit2Sharp.0.23.0-pre20150419160303\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll True @@ -140,7 +140,7 @@ - + diff --git a/src/GitVersionTask/packages.config b/src/GitVersionTask/packages.config index 93b6121f7c..14ba94b36d 100644 --- a/src/GitVersionTask/packages.config +++ b/src/GitVersionTask/packages.config @@ -4,8 +4,8 @@ - - + + \ No newline at end of file From c0065eee3c4d3307a96e6f63808e12f2b1d586b8 Mon Sep 17 00:00:00 2001 From: mkoertgen Date: Fri, 26 Aug 2016 16:39:41 +0200 Subject: [PATCH 2/6] added noop implementations for updated libgitsharp --- .../Mocks/MockQueryableCommitLog.cs | 5 +++++ src/GitVersionCore.Tests/Mocks/MockRepository.cs | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/GitVersionCore.Tests/Mocks/MockQueryableCommitLog.cs b/src/GitVersionCore.Tests/Mocks/MockQueryableCommitLog.cs index 43858d43d0..a612913953 100644 --- a/src/GitVersionCore.Tests/Mocks/MockQueryableCommitLog.cs +++ b/src/GitVersionCore.Tests/Mocks/MockQueryableCommitLog.cs @@ -42,6 +42,11 @@ public IEnumerable QueryBy(string path, FollowFilter filter) throw new NotImplementedException(); } + public IEnumerable QueryBy(string path, CommitFilter filter) + { + throw new NotImplementedException(); + } + public Commit FindMergeBase(Commit first, Commit second) { return null; diff --git a/src/GitVersionCore.Tests/Mocks/MockRepository.cs b/src/GitVersionCore.Tests/Mocks/MockRepository.cs index b10691906c..cf84a8dd73 100644 --- a/src/GitVersionCore.Tests/Mocks/MockRepository.cs +++ b/src/GitVersionCore.Tests/Mocks/MockRepository.cs @@ -47,6 +47,11 @@ public Branch Checkout(Commit commit, CheckoutOptions options) throw new NotImplementedException(); } + public void Checkout(Tree tree, IEnumerable paths, CheckoutOptions opts) + { + throw new NotImplementedException(); + } + public void CheckoutPaths(string committishOrBranchSpec, IEnumerable paths, CheckoutOptions checkoutOptions = null) { throw new NotImplementedException(); @@ -197,6 +202,11 @@ public string Describe(Commit commit, DescribeOptions options) throw new NotImplementedException(); } + public void RevParse(string revision, out Reference reference, out GitObject obj) + { + throw new NotImplementedException(); + } + public Branch Head { get; set; } public Configuration Config { get; set; } public Index Index { get; set; } From cf36adb1811e6bc4c40c33a44934fd4d031404e6 Mon Sep 17 00:00:00 2001 From: mkoertgen Date: Sat, 27 Aug 2016 10:51:04 +0200 Subject: [PATCH 3/6] removed deprecate-warnings by replacing with libgit commands --- src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs b/src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs index 060ab92c6f..fbbe84bfeb 100644 --- a/src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs +++ b/src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs @@ -26,17 +26,17 @@ public void GivenARemoteWithATagOnMaster_AndAPullRequestWithTwoCommits_AndBuildI remoteRepository.MakeATaggedCommit("1.0.3"); var branch = remoteRepository.CreateBranch("FeatureBranch"); - remoteRepository.Checkout(branch); + Commands.Checkout(remoteRepository, branch); remoteRepository.MakeCommits(2); - remoteRepository.Checkout(remoteRepository.Head.Tip.Sha); + Commands.Checkout(remoteRepository, remoteRepository.Head.Tip.Sha); //Emulate merge commit var mergeCommitSha = remoteRepository.MakeACommit().Sha; - remoteRepository.Checkout("master"); // HEAD cannot be pointing at the merge commit + Commands.Checkout(remoteRepository, "master"); // HEAD cannot be pointing at the merge commit remoteRepository.Refs.Add(pullRequestRef, new ObjectId(mergeCommitSha)); // Checkout PR commit Commands.Fetch((Repository)fixture.Repository, "origin", new string[0], new FetchOptions(), null); - fixture.Repository.Checkout(mergeCommitSha); + Commands.Checkout(fixture.Repository, mergeCommitSha); } var result = GitVersionHelper.ExecuteIn(fixture.RepositoryPath, isTeamCity: true); From a8e8aed8ce3462acf16816d08363696d828121ce Mon Sep 17 00:00:00 2001 From: mkoertgen Date: Sat, 27 Aug 2016 10:51:41 +0200 Subject: [PATCH 4/6] Assert we have json output --- src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs b/src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs index fbbe84bfeb..84484f0afd 100644 --- a/src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs +++ b/src/GitVersionExe.Tests/PullRequestInTeamCityTest.cs @@ -42,6 +42,9 @@ public void GivenARemoteWithATagOnMaster_AndAPullRequestWithTwoCommits_AndBuildI var result = GitVersionHelper.ExecuteIn(fixture.RepositoryPath, isTeamCity: true); result.ExitCode.ShouldBe(0); + + result.Output.ShouldStartWith("{", "we expect valid json output to parse back output variables"); + result.OutputVariables.FullSemVer.ShouldBe("1.0.4-PullRequest0005.3"); // Cleanup repository files From ab2aa31105ad09e7add4678d73d51a430d55bba6 Mon Sep 17 00:00:00 2001 From: mkoertgen Date: Fri, 23 Sep 2016 10:01:37 +0200 Subject: [PATCH 5/6] Updated libgit2sharp to fix teamcity tests --- src/GitVersionCore.Tests/GitVersionCore.Tests.csproj | 6 +++--- src/GitVersionCore.Tests/packages.config | 4 ++-- src/GitVersionCore/GitVersionCore.csproj | 6 +++--- src/GitVersionCore/packages.config | 4 ++-- src/GitVersionExe.Tests/GitVersionExe.Tests.csproj | 6 +++--- src/GitVersionExe.Tests/packages.config | 4 ++-- src/GitVersionExe/GitVersionExe.csproj | 6 +++--- src/GitVersionExe/packages.config | 4 ++-- src/GitVersionTask.Tests/GitVersionTask.Tests.csproj | 6 +++--- src/GitVersionTask.Tests/packages.config | 4 ++-- src/GitVersionTask/GitVersionTask.csproj | 6 +++--- src/GitVersionTask/packages.config | 4 ++-- 12 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj b/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj index 22d42726fa..5a573a3e73 100644 --- a/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj +++ b/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj @@ -1,6 +1,6 @@  - + Debug @@ -51,7 +51,7 @@ True - ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160922233542\lib\net40\LibGit2Sharp.dll True @@ -200,7 +200,7 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/src/GitVersionCore.Tests/packages.config b/src/GitVersionCore.Tests/packages.config index 247c6121f1..09a1562871 100644 --- a/src/GitVersionCore.Tests/packages.config +++ b/src/GitVersionCore.Tests/packages.config @@ -4,8 +4,8 @@ - - + + diff --git a/src/GitVersionCore/GitVersionCore.csproj b/src/GitVersionCore/GitVersionCore.csproj index 36a6d6240e..163f0c0cc7 100644 --- a/src/GitVersionCore/GitVersionCore.csproj +++ b/src/GitVersionCore/GitVersionCore.csproj @@ -1,6 +1,6 @@  - + Debug @@ -48,7 +48,7 @@ False - ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160922233542\lib\net40\LibGit2Sharp.dll True @@ -196,7 +196,7 @@ - + diff --git a/src/GitVersionCore/packages.config b/src/GitVersionCore/packages.config index 4f0694fdb1..2fb866e5be 100644 --- a/src/GitVersionCore/packages.config +++ b/src/GitVersionCore/packages.config @@ -4,8 +4,8 @@ - - + + diff --git a/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj b/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj index 2c44b44e40..41c3b5efb1 100644 --- a/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj +++ b/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj @@ -1,6 +1,6 @@  - + Debug @@ -44,7 +44,7 @@ True - ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160922233542\lib\net40\LibGit2Sharp.dll True @@ -144,6 +144,6 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/src/GitVersionExe.Tests/packages.config b/src/GitVersionExe.Tests/packages.config index 8470d43757..e9f326f129 100644 --- a/src/GitVersionExe.Tests/packages.config +++ b/src/GitVersionExe.Tests/packages.config @@ -2,8 +2,8 @@ - - + + diff --git a/src/GitVersionExe/GitVersionExe.csproj b/src/GitVersionExe/GitVersionExe.csproj index 16f0cbcdc5..ed56e46302 100644 --- a/src/GitVersionExe/GitVersionExe.csproj +++ b/src/GitVersionExe/GitVersionExe.csproj @@ -1,6 +1,6 @@  - + Debug AnyCPU @@ -50,7 +50,7 @@ False - ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160922233542\lib\net40\LibGit2Sharp.dll True @@ -219,7 +219,7 @@ - + diff --git a/src/GitVersionExe/packages.config b/src/GitVersionExe/packages.config index b030308001..a2eb9a15cf 100644 --- a/src/GitVersionExe/packages.config +++ b/src/GitVersionExe/packages.config @@ -5,8 +5,8 @@ - - + + \ No newline at end of file diff --git a/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj b/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj index 7d81538d2f..187616bd73 100644 --- a/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj +++ b/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj @@ -1,6 +1,6 @@  - + Debug AnyCPU @@ -61,7 +61,7 @@ True - ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160922233542\lib\net40\LibGit2Sharp.dll True @@ -209,7 +209,7 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/src/GitVersionTask.Tests/packages.config b/src/GitVersionTask.Tests/packages.config index e642a31c49..35987f3a00 100644 --- a/src/GitVersionTask.Tests/packages.config +++ b/src/GitVersionTask.Tests/packages.config @@ -5,8 +5,8 @@ - - + + diff --git a/src/GitVersionTask/GitVersionTask.csproj b/src/GitVersionTask/GitVersionTask.csproj index ab36f88e56..762d535fe5 100644 --- a/src/GitVersionTask/GitVersionTask.csproj +++ b/src/GitVersionTask/GitVersionTask.csproj @@ -1,6 +1,6 @@  - + Debug @@ -44,7 +44,7 @@ True - ..\packages\LibGit2Sharp.0.23.0-pre20160803182831\lib\net40\LibGit2Sharp.dll + ..\packages\LibGit2Sharp.0.23.0-pre20160922233542\lib\net40\LibGit2Sharp.dll True @@ -140,7 +140,7 @@ - + diff --git a/src/GitVersionTask/packages.config b/src/GitVersionTask/packages.config index 14ba94b36d..8ec4510a82 100644 --- a/src/GitVersionTask/packages.config +++ b/src/GitVersionTask/packages.config @@ -4,8 +4,8 @@ - - + + \ No newline at end of file From de91593d1934bcd1375de560f39cf7a26ba713c9 Mon Sep 17 00:00:00 2001 From: mkoertgen Date: Tue, 11 Oct 2016 12:45:28 +0200 Subject: [PATCH 6/6] merged eols from upstream/master --- .../build-server/continua.md | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/docs/build-server-support/build-server/continua.md b/docs/build-server-support/build-server/continua.md index 840eee9eff..156148479c 100644 --- a/docs/build-server-support/build-server/continua.md +++ b/docs/build-server-support/build-server/continua.md @@ -1,45 +1,45 @@ -# Continua CI Setup - -This guide explains how to run GitVersion inside [Continua CI](https://www.finalbuilder.com/continua-ci). - -## Assumptions -This guide assumes a few variables are present in the configuration. Note that this example uses `Catel` as repository name, but it should be replaced by the name of the repository where GitVersion is runnign against. - -* RepositoryBranchName => $Source.Catel.BranchName$ -* RepositoryCommitId => $Source.Catel.LatestChangeset.Id$ -* RepositoryName => Catel -* RepositoryName => $Source.Catel.Path$ -* RepositoryUrl => $Source.Catel.Url$ - -It also requires a few variables which will automatically be filled by GitVersion. The example below are just a few, any of the GitVersion variables written to the output can be used. - -* GitVersion_FullSemVer -* GitVersion_MajorMinorPatch -* GitVersion_NuGetVersion - -You also need to add a property collector for the agents to detect the GitVersion tool on the agents: - -* Namespace => GitVersion -* Run On => Agent -* Type => Path Finder Plugin -* Property Name => Path -* Executable => GitVersion.exe -* Search paths => your installation folder (e.g. `C:\Tools\GitVersion` or if you are using Chocolatey `C:\ProgramData\chocolatey\lib\GitVersion.Portable\tools`) - -## Basic Usage -To run GitLink inside [Continua CI](https://www.finalbuilder.com/continua-ci), follow the steps below: - -* Add a new `Execute Program` step to a stage -* In the `Execute Program` tab, set the following values: - * Executable path: $Agent.GitVersion.Path$ - * Working directory: %RepositoryPath% -* In the `Arguments` tab, set the following values: - * Arguments: /url %RepositoryUrl% /b %RepositoryBranchName% /c %RepositoryCommitId% /output buildserver -* In the `Options` tab, set the following values: - * Wait for completion: checked - * Log output: checked - * Check program exit code: checked - * Exit code must be: equal to - * Exit code: 0 - -Now GitVersion will automatically run and fill the `GitVersion_` variables. +# Continua CI Setup + +This guide explains how to run GitVersion inside [Continua CI](https://www.finalbuilder.com/continua-ci). + +## Assumptions +This guide assumes a few variables are present in the configuration. Note that this example uses `Catel` as repository name, but it should be replaced by the name of the repository where GitVersion is runnign against. + +* RepositoryBranchName => $Source.Catel.BranchName$ +* RepositoryCommitId => $Source.Catel.LatestChangeset.Id$ +* RepositoryName => Catel +* RepositoryName => $Source.Catel.Path$ +* RepositoryUrl => $Source.Catel.Url$ + +It also requires a few variables which will automatically be filled by GitVersion. The example below are just a few, any of the GitVersion variables written to the output can be used. + +* GitVersion_FullSemVer +* GitVersion_MajorMinorPatch +* GitVersion_NuGetVersion + +You also need to add a property collector for the agents to detect the GitVersion tool on the agents: + +* Namespace => GitVersion +* Run On => Agent +* Type => Path Finder Plugin +* Property Name => Path +* Executable => GitVersion.exe +* Search paths => your installation folder (e.g. `C:\Tools\GitVersion` or if you are using Chocolatey `C:\ProgramData\chocolatey\lib\GitVersion.Portable\tools`) + +## Basic Usage +To run GitLink inside [Continua CI](https://www.finalbuilder.com/continua-ci), follow the steps below: + +* Add a new `Execute Program` step to a stage +* In the `Execute Program` tab, set the following values: + * Executable path: $Agent.GitVersion.Path$ + * Working directory: %RepositoryPath% +* In the `Arguments` tab, set the following values: + * Arguments: /url %RepositoryUrl% /b %RepositoryBranchName% /c %RepositoryCommitId% /output buildserver +* In the `Options` tab, set the following values: + * Wait for completion: checked + * Log output: checked + * Check program exit code: checked + * Exit code must be: equal to + * Exit code: 0 + +Now GitVersion will automatically run and fill the `GitVersion_` variables.