[Bug] NugetPreReleaseTag does not respect padding setting
See original GitHub issueDescription
With padding set, the nugetprereleasetag
does not match the nugetversionv2
legacy-semver-padding: 3
build-metadata-padding: 3
commits-since-version-source-padding: 3
Expected Behavior
"NuGetVersionV2": "0.1.1-ci011",
"NuGetVersion": "0.1.1-ci011",
"NuGetPreReleaseTagV2": "ci011",
"NuGetPreReleaseTag": "ci011",
Actual Behavior
"NuGetVersionV2": "0.1.1-ci011",
"NuGetVersion": "0.1.1-ci011",
"NuGetPreReleaseTagV2": "ci0011",
"NuGetPreReleaseTag": "ci0011",
Possible Fix
Steps to Reproduce
Relevant config:
legacy-semver-padding: 3
build-metadata-padding: 3
commits-since-version-source-padding: 3
Environment
5.6.6+Branch.main.Sha.80adc3f3b8919b655adca7b796b273fb10478c3f
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@asbjornu Today I learned that I must not remove padding as I suggested. It is true that nuget actually supports SemVer 2.0.0 but even according to SemVer 2.0, I think that the following is true
1.0.0-beta10
<1.0.0-beta9
.The dot in the prerelease identifier is actually significant. The following is also true:
1.0.0-beta.9
<1.0.0-beta.10
.So I think, if you want to use
NuGetVersionV2
orNuGetVersion
, make sure you have enough padding active. And if you don’t want to have padding, useSemVer
orFullSemVer
(wich both contain the dot).If you don’t want padding, can’t you use
SemVer
orFullSemVer
?