Skip to content

Incorrect next_major, next_minor and next_patch in prerelease SemverVersion #121

Open
@keshav-space

Description

@keshav-space
>>> 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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    2-nextbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions