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

Incorrect next_major, next_minor and next_patch in prerelease SemverVersion #121

Open
keshav-space opened this issue Sep 4, 2023 · 0 comments
Labels
2-next bug Something isn't working

Comments

@keshav-space
Copy link
Member

keshav-space commented Sep 4, 2023

>>> from univers.versions import SemverVersion
>>> SemverVersion("1.0.0-beta").next_major()
SemverVersion(string='1.0.0')
>>> SemverVersion("1.0.0-beta").next_minor()
SemverVersion(string='1.0.0')
>>> SemverVersion("1.0.0-beta").next_patch()
SemverVersion(string='1.0.0')

This is likely a bug in python-semanticversion

Edit

This indeed is a bug see the behavior of python-semver below

>>> import semver
>>> version = semver.VersionInfo.parse("1.0.0-beta")
>>> str(version)
'1.0.0-beta'
>>> str(version.bump_major())
'2.0.0'
>>> str(version.bump_minor())
'1.1.0'
>>> str(version.bump_patch())
'1.0.1'
@keshav-space keshav-space added the bug Something isn't working label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2-next bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants