Skip to content

Conversation

@mjcheetham
Copy link
Contributor

@mjcheetham mjcheetham commented Jan 27, 2026

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>

Extensive tests cover all known version formats spotted in the wild, including:

2.30.1
2.30.1.windows.1.2
2.30.1.vfs.1.2
2.30.1.abcxyz
2.30.1.abcxyz.0
2.30.1.abcxyz.0.0
2.50.1 (Apple Git-155)

2.30.1.rc0
2.30.1-rc0
2.30.1.rc0.windows.1.2
2.30.1-rc0.windows.1.2

2.30.1-rc0.gfa1b1fa13de1c5599a2f57d36ec03bbcc315e9b0
2.30.1.rc0.gfa1b1fa13de1c5599a2f57d36ec03bbcc315e9b0
2.30.1-rc0.windows.1.2.gfa1b1fa13de1c5599a2f57d36ec03bbcc315e9b0
2.30.1.rc0.windows.1.2.gfa1b1fa13de1c5599a2f57d36ec03bbcc315e9b0

@mjcheetham mjcheetham force-pushed the gitver branch 4 times, most recently from c81745e to aea46ed Compare January 27, 2026 14:18
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant