bumpversion flow:
1.0.0 => 1.0.1-dev0 => 1.0.1-dev1 = > 1.0.1-rc0 => 1.0.1-rc1 => 1.0.1
patch build release build release
Start with an initial release, say 1.0.0
.
-
Starting a new development cycle by bumping
patch
only once!$ bumpversion patch --no-commit git tag => v1.0.1-dev0 CMake PROJECT_VERSION => 1.0.1(.0)?
-
Every time you build, bump
build
.$ bumpversion build --no-tag git tag => v1.0.1-dev1 CMake PROJECT_VERSION => 1.0.1.1
-
Go to release candidate by bumping
release
only once!$ bumpversion release --no-commit git tag => v1.0.1-rc0 CMake PROJECT_VERSION => 1.0.1(.0)?
-
With every new build, bump
build
.$ bumpversion build --tag git tag => v1.0.1-rc1 CMake PROJECT_VERSION => 1.0.1.1
-
Finally, bump
release
to generate a final release for the currentmajor
/minor
/patch
version.$ bumpversion release --tag git tag => v1.0.1 CMake PROJECT_VERSION => 1.0.1
-
Once the final release has been reached, it is not possible to bump the
release
before bumpingpatch
again. Trying to bump the release while in final release state will issueValueError: The part has already the maximum value among ['dev', 'rc', 'ga'] and cannot be bumped
. -
A whole version string may be set with:
bumpversion --new-version 11.1.4-rc2 --tag release
To install bumpversion:
pip install --upgrade bump2version
https://github.com/c4urself/bump2version#installation https://cmake.org/cmake/help/latest/variable/PROJECT_VERSION.html#variable:PROJECT_VERSION