We should be able to use this configuration for bumpversion to properly work with a -snapshot suffix without the need for semver:
[bumpversion]
current_version = 0.2.2-snapshot
search = version: {current_version}
replace = version: {new_version}
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>snapshot))?
serialize =
{major}.{minor}.{patch}-{release}
{major}.{minor}.{patch}
[bumpversion:part:release]
first_value = snapshot
optional_value = release
values =
snapshot
release
We should be able to use this configuration for bumpversion to properly work with a
-snapshotsuffix without the need for semver:Then
bumpversion releasealways removes the suffix andbumpversion major,bumpversion minorandbumpversion patchalways add it. In order to do a major or minor release 2 bumpversion commands can be chained then:Notes