Closed
Description
Description
I am working on some projects where the version is a combination of the a public api version + our local version.
Example: 5.3.1+1.0.0
.
So when we bump we actually wants to bump only the local version like 5.3.1+1.0.0
-> 5.3.1+1.1.0
, but cz
completely ignores the local version and only bumps the first release like:
➜ cz bump --files-only --yes
bump: version 5.3.1+0.9.0 → 5.4.0
This does seems like would be a breaking change though...
Possible Solution
A possible solution would be to modify the semver_generator() to check if the local version complies with semver and bump the local version instead. The method would return the entire version like 5.3.1+1.1.0
.
>>> from packaging.version import Version
>>> a = Version("5.3.1+1.0.0")
>>> a.base_version
'5.3.1'
>>> a.local
'1.0.0'
>>> b.base_version
'1.0.0'
>>> b.release
(1, 0, 0)
If you accept, I will be happy to create a PR with the changes.
Additional context
References: Python 440 Local version