With GitVersion 6.x the PreReleaseNumber is always 1 #4464
-
I am releasing a NuGet package and I need to have an unique version for each commit using the following configuration: mode: ContinuousDeployment
major-version-bump-message: '(\+semver:\s?(breaking|major)|^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([\.\w\s\-,\/\\]*\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\s.+))'
minor-version-bump-message: '(\+semver:\s?(feature|minor)|^(feat)(\(([\.\w\s\-,\/\\]*\)))?:)'
patch-version-bump-message: '(\+semver:\s?(fix|patch)|^(fix|perf)(\(([\.\w\s\-,\/\\]*\)))?:)' Using version {
"AssemblySemFileVer": "4.0.0.0",
"AssemblySemVer": "4.0.0.0",
"BranchName": "features/feature_68017",
"BuildMetaData": 16,
"CommitDate": "2025-03-19",
"CommitsSinceVersionSource": 16,
"EscapedBranchName": "features-feature-68017",
"FullBuildMetaData": "16.Branch.features-feature-68017.Sha.1c49a98cfddc53f954f8bc17d995d220ccdcd543",
"FullSemVer": "4.0.0-feature-68017.1+16",
"InformationalVersion": "4.0.0-feature-68017.1+16.Branch.features-feature-68017.Sha.1c49a98cfddc53f954f8bc17d995d220ccdcd543",
"Major": 4,
"MajorMinorPatch": "4.0.0",
"Minor": 0,
"Patch": 0,
"PreReleaseLabel": "feature-68017",
"PreReleaseLabelWithDash": "-feature-68017",
"PreReleaseNumber": 1,
"PreReleaseTag": "feature-68017.1",
"PreReleaseTagWithDash": "-feature-68017.1",
"SemVer": "4.0.0-feature-68017.1",
"Sha": "1c49a98cfddc53f954f8bc17d995d220ccdcd543",
"ShortSha": "1c49a98",
"UncommittedChanges": 10,
"VersionSourceSha": "04e6b4a2752051f4cd4410e84ee0085881107d5e",
"WeightedPreReleaseNumber": 30001
} With older versions like {
"Major": 4,
"Minor": 0,
"Patch": 0,
"PreReleaseTag": "feature-68017.53",
"PreReleaseTagWithDash": "-feature-68017.53",
"PreReleaseLabel": "feature-68017",
"PreReleaseLabelWithDash": "-feature-68017",
"PreReleaseNumber": 53,
"WeightedPreReleaseNumber": 30053,
"BuildMetaData": null,
"BuildMetaDataPadded": "",
"FullBuildMetaData": "Branch.features-feature-68017.Sha.1c49a98cfddc53f954f8bc17d995d220ccdcd543",
"MajorMinorPatch": "4.0.0",
"SemVer": "4.0.0-feature-68017.53",
"LegacySemVer": "4.0.0-feature-68017-53",
"LegacySemVerPadded": "4.0.0-feature-68017-0053",
"AssemblySemVer": "4.0.0.0",
"AssemblySemFileVer": "4.0.0.0",
"FullSemVer": "4.0.0-feature-68017.53",
"InformationalVersion": "4.0.0-feature-68017.53+Branch.features-feature-68017.Sha.1c49a98cfddc53f954f8bc17d995d220ccdcd543",
"BranchName": "features/feature_68017",
"EscapedBranchName": "features-feature-68017",
"Sha": "1c49a98cfddc53f954f8bc17d995d220ccdcd543",
"ShortSha": "1c49a98",
"NuGetVersionV2": "4.0.0-feature-68017-0053",
"NuGetVersion": "4.0.0-feature-68017-0053",
"NuGetPreReleaseTagV2": "feature-68017-0053",
"NuGetPreReleaseTag": "feature-68017-0053",
"VersionSourceSha": "1a42852ec9d4dce4d71d99a2467fbfb7cc1aac5a",
"CommitsSinceVersionSource": 53,
"CommitsSinceVersionSourcePadded": "0053",
"UncommittedChanges": 10,
"CommitDate": "2025-03-19"
} NuGet tool when I provide the version like "4.0.0-feature-68017.1+16" truncates the version and generates a package like "4.0.0-feature-68017.1". |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The breaking change document says:
The GitFlow workflow (which is the default workflow) the deployment mode is set to workflow: GitFlow/v1
branches:
feature:
mode: ContinuousDelivery Happy Branching! See also: https://gitversion.net/docs/reference/configuration#snippet-/docs/workflows/GitFlow/v1.yml |
Beta Was this translation helpful? Give feedback.
The breaking change document says:
The GitFlow workflow (which is the default workflow) the deployment mode is set to
ManualDeployment
for feature branches. If you don't want this you need to change it in your example toContinuousDelivery
.Happy Branching!
See also: https://gitversion.net/docs/reference/configuration#snippet-/docs/workflows/GitFlow/v1.yml