6 releases (stable)
✓ Uses Rust 2018 edition
|1.0.5||Feb 28, 2020|
|1.0.3||Feb 14, 2020|
|1.0.2||Jan 20, 2020|
|0.1.0||Nov 2, 2019|
#22 in Build Utils
49 downloads per month
what-bump is a simple tool that reads the commit history of a git repository,
and uses commit messages to decide what kind of version bump is required.
Moreover, if you provide
what-bump with the current version number of your software,
it will tell you what the next version number has to be.
However, most of those tools are deeply integrated with NPM, or somehow assume that you're
using NPM, try to manage the entire release process of your software, and are not trivial
to set up (especially if you're not using NPM!).
The only tool I could find that does not integrate with NPM is
calcver, but it is very
young, very undocumented, and probably more powerful and/or complex than I need a tool
what-bump, sets out to be a simple, self-explanatory, zero-configuration
utility to do one and only one thing: determine your software's next version number
based on all the commit messages up to a previous revision. You need to specify what
the previous revision is (we assume you have it tagged and know enough
bash magic to
do it) and what the current version is (ditto).
The easiest way to get
what-bump is installing it using cargo,
with the following command:
cargo install what-bump
If you prefer Docker, there is an official image on dockerhub: https://hub.docker.com/r/albx79/what-bump
To get all the explanation you need.
Basically, assuming you tagged your previous version as
v1.0.2, just type
what-bump v1.0.2 --from 1.0.2
to get the next version number printed to standard output.
what-bump is a little bit more accepting than Conventional Commits specifies.
In particular, it only checks that the commit type starts with "fix" or "feat" (case insensitive), therefore it will also accept things like "feature", "fixed", or "fixing".
Also, any other commit type, or commits that don't comply with the spec, will be ignored and won't contribute to a version bump.
what-bump is written in Rust. You'll need at least version
1.36 to build (that's what I used). Install rust following the instructions on the official
It depends on git2-rs, which requires libgit2 to be installed on your system. It should already be available if you're using git.
To build from sources, clone the repository and build with:
cargo build --release
Then you can install it locally with
cargo install --path .
Alternatively, if you have docker, you can build
the Dockerfile provided:
docker build . -t what-bump
And then run it with e.g.:
docker run -v $PWD:/data what-bump --path /data --help