-
Notifications
You must be signed in to change notification settings - Fork 652
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
GitVersion.MSBuild with Packable .NET 8 project does not get valid SemVer #4110
Comments
In my case I am getting the below This is wrong it should be 0.1.0.32-TAS-42-moe, I have fall back to version 5.12.0 to get the correct version and my build starts working. |
its also our solution to fall back at the moment, but there should be a fix otherwise no-one can build build nuget packages with V6, unless there is a workaround for the gitversion config :) |
I am having a similar problem as FullSemVer has changed from v5.12.0, using it for tags on docker images and for nuget. Specifically feature branches. With version 5.12.0 With version 6.0.0 The addition of the 1+ causes docker build to abort and nuget to label as 1.6.0-MyFeature.1 which is overriding the first change in the feature branch. My config is
|
The issue is the underscores in the branch name. So, the workaround is to not use underscores in the branch name. Underscores used to be replaced by a dash but since underscores were added to the allowed characters in a branch name in 9ede034 to facilitate certain regex patterns, underscores are no longer replaced. Seems like a simple replace might fix it: vinnyrose/GitVersion@main...feature/underscore-label-fix ref: #3687 |
@vinnyrose thank you for taking the time to understand the issue, please submit the PR and if the build succeeds I think it can be merged |
🎉 This issue has been resolved in version 6.0.1 🎉 Your GitReleaseManager bot 📦🚀 |
Prerequisites
GitVersion package
GitVersion.MsBuild
GitVersion version
6.0.0
Operating system
Windows
What are you seeing?
I cannot build any more after updating to gitversion 6.0.0 using the corresponding msbuild task, because the build complains about an invalid package version (I had to translate german error message to english: System.ArgumentException: the PackageVersion character sequence "0.6.0-HYP-719_update_gitversion.1+27" is invalid. Seems like its using the FullSemVer rather than SemVer. See gitversion output:
{ "AssemblySemFileVer": "0.6.0.0", "AssemblySemVer": "0.6.0.0", "BranchName": "feature/HYP-719_update_gitversion", "BuildMetaData": 27, "CommitDate": "2024-07-23", "CommitsSinceVersionSource": 27, "EscapedBranchName": "feature-HYP-719-update-gitversion", "FullBuildMetaData": "27.Branch.feature-HYP-719-update-gitversion.Sha.e76a9b28e6258a87b32e44279fa902afb216134a", "FullSemVer": "0.6.0-HYP-719_update_gitversion.1+27", "InformationalVersion": "0.6.0-HYP-719_update_gitversion.1+27.Branch.feature-HYP-719-update-gitversion.Sha.e76a9b28e6258a87b32e44279fa902afb216134a", "Major": 0, "MajorMinorPatch": "0.6.0", "Minor": 6, "Patch": 0, "PreReleaseLabel": "HYP-719_update_gitversion", "PreReleaseLabelWithDash": "-HYP-719_update_gitversion", "PreReleaseNumber": 1, "PreReleaseTag": "HYP-719_update_gitversion.1", "PreReleaseTagWithDash": "-HYP-719_update_gitversion.1", "SemVer": "0.6.0-HYP-719_update_gitversion.1", "Sha": "e76a9b28e6258a87b32e44279fa902afb216134a", "ShortSha": "e76a9b2", "UncommittedChanges": 0, "VersionSourceSha": "0009dd4c353672803f36f7ea2e3a6ccd793d8203", "WeightedPreReleaseNumber": 30001 }
What is expected?
Build works and version of the build nuget package is 0.6.0-HYP-719_update_gitversion.1, not 0.6.0-HYP-719_update_gitversion.1+27 which is invalid.
Steps to Reproduce
mode: ContinuousDelivery branches: release: regex: ^release/.+|tag/.+rc\d+$ label: rc pull-request: label: pr ignore: sha: [] merge-message-formats: {}
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
No response
The text was updated successfully, but these errors were encountered: