GitVersion
GitVersion copied to clipboard
The pre-release part of a version as part of a tag is not correctly retained
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched issues to ensure it has not already been reported
GitVersion package
GitVersion.MsBuild
GitVersion version
6.0.0-beta.6
Operating system
Windows
What are you seeing?
A commit is tagged with the following value: 1.15.3-rc.5
As described on gitversion documentation, it says the version is taken. It's not clear though what this means?
The tool does not take over the pre-release tag 'as-is' -> rc.5 . Instead it does seem to intepret it, but the . becomes a - and it still increments the version -> Adding a .1
The output from the tool is as follows:
{ "AssemblySemFileVer": "1.15.3.0", "AssemblySemVer": "1.15.3.0", "BranchName": "1.15.3-rc.5", "BuildMetaData": 4, "CommitDate": "2024-04-10", "CommitsSinceVersionSource": 4, "EscapedBranchName": "1-15-3-rc-5", "FullBuildMetaData": "4.Branch.1.15.3-rc.5.Sha.3efad6304148f2da94bae3588fe5c72202fd864a", "FullSemVer": "1.15.3-rc-5.1+4", "InformationalVersion": "1.15.3-rc-5.1+4.Branch.1.15.3-rc.5.Sha.3efad6304148f2da94bae3588fe5c72202fd864a", "Major": 1, "MajorMinorPatch": "1.15.3", "Minor": 15, "Patch": 3, "PreReleaseLabel": "rc-5", "PreReleaseLabelWithDash": "-rc-5", "PreReleaseNumber": 1, "PreReleaseTag": "rc-5.1", "PreReleaseTagWithDash": "-rc-5.1", "SemVer": "1.15.3-rc-5.1", "Sha": "3efad6304148f2da94bae3588fe5c72202fd864a", "ShortSha": "3efad63", "UncommittedChanges": 0, "VersionSourceSha": "5be1554d045273cfd4a04025a[78](https://xxxxxxxxx/-/jobs/6595098262#L78)d283c0034b176", "WeightedPreReleaseNumber": 1 }
What is expected?
I would have expected the following:
- "MajorMinorPatch": "1.15.3" (this is correct)
- "PreReleaseTag": "rc.5"
Steps to Reproduce
Add a tag on a commit that contains both a major.minor.patch version and a pre-release tag: 1.0.0-rc.3.
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
No response
It is not possible to verify your issue when no information about the status of your repository and the used configuration is documented. Probably the configured branch label does not match with the tag label name.