Set of mix tasks for updating the SEMVER of your project
automatically.
A tool to quickly bump any field of a well constructed SEMVER string
in your mix.exs file.
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes MINOR version when you add functionality in a backward compatible manner PATCH version when you make backward compatible bug nfixes Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
Installation
If available in Hex, the package can be installed
by adding semver_mgr to your list of dependencies in mix.exs:
def deps do
[
{:semver_mgr, "~> 1.0", only: :dev, runtime: false}
]
endUsage
To increment your patch version automatically run. You will still need to commit this change afterwards.
mix semver.increment
Aditionally you may specify which field you would like to increment, and optionally by how much.
mix semver.increment minor 3
Incremented 0.1.0 -> 0.4.0
By default incremeting a Major or Minor version will reset the
lower fields to 0. This may be skipped by using the --preserve flag.
mix semver.increment major --preserve patch
Incremented 1.2.3 -> 2.0.3
mix semver.increment major --preserve
Incremented 1.2.3 -> 2.2.3
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/semver_mgr.