Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The pre-release part of a version as part of a tag is not correctly retained #3998

Closed
2 tasks done
p-joole opened this issue Apr 10, 2024 · 1 comment
Closed
2 tasks done

Comments

@p-joole
Copy link

p-joole commented Apr 10, 2024

Prerequisites

  • I have written a descriptive issue title
  • 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

@HHobeck
Copy link
Contributor

HHobeck commented Apr 11, 2024

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.

@HHobeck HHobeck closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants