Automatic Semantic Versioning for git based software development
Automatic Semantic Versioning for git based software development.
For more information head to the project site.
Works out of the box with trunk based development, GitFlow and GithubFlow. Alternatively all of this can be configured
based on the branch name so release/main branches get different version numbers to develop or feature branches.
Install with brew, scoop or simply download the binary for your os
from the releases page and copy somewhere on your path.
Start by using Conventional Commits to indicate whether the commits contain
major, minor or patch level changes.
$ git commit -m "feat: added a new feature (this will increment the minor version)"
Then call git mkver next
and it will tell you the next version of the software should be if you publish now.
$ git mkver next
v0.4.0
If you would like to publish a version, git-mkver can tag the current commit.
$ git mkver tag
This will apply an annotated tag from the next
command to the current commit.
If you would like to patch version numbers in files prior to building and tagging then
you can use the patch
command. The files to be patched and the replacements are
defined in the mkver.conf
config file. A large number of standard patches come
pre-defined.
$ git mkver patch