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
patchonly once!$ bumpversion patch --no-tag git tag => v1.0.1-dev0 CMake PROJECT_VERSION => 1.0.1(.0)? -
Every time you build, bump
build.$ bumpversion build --allow-dirty --no-tag --commit git tag => v1.0.1-dev1 CMake PROJECT_VERSION => 1.0.1.1 -
Go to release candidate by bumping
releaseonly once!$ bumpversion release --no-commit --no-tag git tag => v1.0.1-rc0 CMake PROJECT_VERSION => 1.0.1(.0)? -
With every new build, bump
build.$ bumpversion build --allow-dirty --commit git tag => v1.0.1-rc1 CMake PROJECT_VERSION => 1.0.1.1 -
Finally, bump
releaseto generate a final release for the currentmajor/minor/patchversion.$ bumpversion release --commit 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
releasebefore bumpingpatchagain. 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.
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