Open ecs-jnguyen opened 3 years ago
I think currently this is not possible.
Eachbump2version
invocation can only bump one part. It can not change minor
and release
in one go.
Ugly workarounds are to use --new-version
(which forces you to handle things manually) or to put the 'beta' string also in the environment variable.
One way I've gotten this to work is for Step 2 in the original post, do the following:
$ export PR_NUM="ignore"
$ bump2version minor --serialize ""major}.{minor}.{patch}" # results in: 1.0.0 --> 1.1.0
Hi I am trying to use bump2version to automate versioning during a CI build. My use case is to mark the package version with a pull request number when opening a pull request and to update the minor version when pushing to the
master
branch.I have gotten it to work, during my master build, I am making 2 commands to increment the version. However I am wondering if there is a more elegant way to do this
What I'm trying to achieve
master
, then I want bump2version to modify the version to be1.1.0-beta123
(I will not commit change and push to github)1.1.0
. Then my CI tool will push the.bumpversion.cfg
andsetup.py
file to github (I am handling the additional git push webhook to stop incrementing version)How I've accomplished this so far
Step 1 Open a pull request number 123 to master
CI tool commands
Step 2 pull request number 123 into master
CI tool commands
.bumpversion.cfg I have configured