-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Generated pre-release part of SemVer differs from SemVer spec #1025
Comments
Did you configure the version scheme? |
I set this field (when initializing) in Actual behavior is exactly same with what stated in the linked manual, which disagrees with SemVer spec. |
I just realized this behavior is OK under SemVer 1.0.0. Maybe it's nice to seperate the two SemVer more clearly? |
What do you mean by "the two semver"? |
SemVer has two major versions now. Version 2 has changed the spec of the pre-release part. |
mm we may need a new version scheme: |
Second this, I'd really enjoy semver 2.0 support! |
Hum, makes sense. |
There it is, implemented in #1072. Note that SemVer2 is underspecified on the (This point is one of the reason than Python community dropped SemVer for PEP440) |
Many thanks! |
@noirbizarre very quick feedback, thanks a bunch!! |
Description
When using SemVer schema and bumping to pre-release version, the version generated is like
1.0.0-a0
.This differs from examples from SemVer spec 9, which is
1.0.0-alpha.0
, using "alpha" instead of "a", and having a dot between "a" and the sequential number.Current behavior may break the version comparison when the number has more than 1 digits.
For example,
1.0.0-a10
is less than1.0.0-a2
according to spec 11, becausea10
is less thana2
lexically.Steps to reproduce
cz bump --pr alpha
Current behavior
Bumped into
x.y.z-a0
Desired behavior
Bumped into
x.y.z-a.0
orx.y.z-alpha.0
Screenshots
No response
Environment
Commitizen Version: 3.18.3
Python Version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Operating System: Linux
The text was updated successfully, but these errors were encountered: