mbarkhau / bumpver

BumpVer: Automatic Versioning
https://github.com/mbarkhau/bumpver
MIT License
199 stars 36 forks source link

rollover behavior with arguments for 'right side' increments #154

Closed dwapstra closed 3 years ago

dwapstra commented 3 years ago

Should an update to a 'left side' field allow 'right side' fields to be updated if an argument is specified to do so?

Example use case: the minor version should start at '1' instead of '0'.

[bumpver]
current_version = "26.1"
version_pattern = "MAJOR.MINOR[.PATCH][PYTAGNUM]"

Major version update does a rollover and resets minor field to 0:

$ bumpver update --major
INFO    - Old Version: 26.1
INFO    - New Version: 27.0

Adding a 'minor' version update to the same command does not affect the minor version field.

$ bumpver update --major --minor
INFO    - Old Version: 26.1
INFO    - New Version: 27.0

Should the minor argument increment the minor version in this case or is the default rollover behavior preferred?

mbarkhau commented 3 years ago

I think you could argue for either one, but this is worth noting I think: https://semver.org/#spec-item-8

Patch and minor version MUST be reset to 0 when major version is incremented.

I don't see a compelling argument to change this behaviour atm.

dwapstra commented 3 years ago

I think you could argue for either one, but this is worth noting I think: https://semver.org/#spec-item-8

Patch and minor version MUST be reset to 0 when major version is incremented.

I don't see a compelling argument to change this behaviour atm.

Ok, thats fine. Will close this.