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
This is inspired by npm's semver increments. To quote the node docs:
premajor in one call will bump the version up to the next major version and down to a prerelease of that major version. preminor, and prepatch work the same way.
E.g.:
$ version
0.3.5
$ bumpversion patch
Bumped from 0.3.5 to 0.3.6
$ bumpversion preminor
Bumped from 0.3.6 to 0.4.0-dev.0
From what I understand it's not possible to replicate this with bumpversion without using --new-version at some point. Either you always walk through the pre-release steps or you don't walk through them at all.
$ version
0.3.5
$ bumpversion patch
Bumped from 0.3.5 to 0.3.6-dev.0
$ bumpversion minor
Bumped from 0.3.6-dev.0 to 0.4.0-dev.0
In many scenarios this is not desirable, as you would want to be able to push out a patch without having to walk through the pre-release steps (e.g. dev → alpha →...).
The only other option is to add first_value = gamma under [bumpversion:part:release] which would change the behavior as follows:
$ version
0.3.5
$ bumpversion patch
Bumped from 0.3.5 to 0.3.6
$ bumpversion minor
Bumped from 0.3.6 to 0.4.0
But to switch to a pre-release you would then have to use --new-version:
$ bumpversion part --new-version=0.4.0-dev.0
Bumped from 0.3.6 to 0.4.0-dev.0
It would be nice to have a shorthand for this rather than having to manually type the release.
P.S.: Thanks for all your work on bump2version! It's nice to see this project alive and thriving.
The text was updated successfully, but these errors were encountered:
I have a similar flow, with the same inconvenience. The limitation being that you can bump only one part at once unless you specify the full new-version (which is error-prone).
The node semver preminor approach requires the tool to know what is a 'pre' value for a part, which bump2version currently does not know.
I think it would be most flexible if bump2version would support multiple part arguments at once, and also allows you to choose between "bump to the next value like usually" or "bump to the value which I explicitly choose here".
A command-line interface like this would be really sweet:
# specify an explicit value for one specific part
bump2version release=gamma
bump2version --part release=gamma
# bump multiple parts in one go
bump2version --part patch --part release
# bump two parts, with one a specific value
bump2version --part patch --part release=gamma
This is inspired by npm's semver increments. To quote the node docs:
E.g.:
From what I understand it's not possible to replicate this with bumpversion without using
--new-version
at some point. Either you always walk through the pre-release steps or you don't walk through them at all.For instance, this config:
would behave as follows:
In many scenarios this is not desirable, as you would want to be able to push out a patch without having to walk through the pre-release steps (e.g. dev → alpha →...).
The only other option is to add
first_value = gamma
under[bumpversion:part:release]
which would change the behavior as follows:But to switch to a pre-release you would then have to use
--new-version
:It would be nice to have a shorthand for this rather than having to manually type the release.
P.S.: Thanks for all your work on bump2version! It's nice to see this project alive and thriving.
The text was updated successfully, but these errors were encountered: