Skip to content

Commit aea46ed

Browse files
committed
gitversion: support forks/RCs/dirty Git versions
Enhance the GitVersion type to be aware of different forks of Git including Git for Windows, Microsoft, and Apple. Also add support for release candidates found in the version string - these can appear as either a -rcN or .rcN format depending on if this is a tag or a build version. We support both types. Finally also capture the Commit ID from a dirty build version, i.e, <major>.<minor>.<patch>.g<sha> Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent d31f62c commit aea46ed

File tree

5 files changed

+1436
-99
lines changed

5 files changed

+1436
-99
lines changed

src/shared/Core.Tests/GitTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ public void Git_Version_ReturnsVersion()
197197
var git = new GitProcess(trace, trace2, processManager, gitPath, Path.GetTempPath());
198198
GitVersion version = git.Version;
199199

200-
Assert.NotEqual(new GitVersion(), version);
201-
200+
Assert.NotEqual(GitVersion.Zero, version);
202201
}
203202

204203
#region Test Helpers

0 commit comments

Comments
 (0)