You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Seems related to #150
It doesn't necessarily have to be a breaking change, what if a flag is used --local-version? would it be breaking?
If you want you can share a PR and we can discuss it there.
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
, butcz
completely ignores the local version and only bumps the first release like: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
.If you accept, I will be happy to create a PR with the changes.
Additional context
References: Python 440 Local version
The text was updated successfully, but these errors were encountered: