Usage:
go-scmversion [OPTIONS]
Application Options:
--current Print out the current version and end
--auto Bump the version based on what is found in the logs; default to #patch
--major Update Major version
--minor Update Minor version
--patch Update Patch version
--pre= Update prerelease
--write Actually write to git and output file
--dir= Directory from which to run the git commands
--file= File to write with the updated version number (default: ./VERSION)
--debug Enable debug logging of the version process
Help Options:
-h, --help Show this help message
3 Phases
A full process involves 3 phases of operation:
Calculate the current version based on the git tags
If no acceptable version is found, it defaults to "0.0.0"
You can limit the execution to just output this via the --current directive.
Increment the version forward the desired way
The --auto directive looks for "#major"/"#minor"/"#patch" in the git logs since the Current tag, and will bump the appropriate level if found.
Store and output the updated version
You must use the --write directive to make this phase happen
This creates the tag locally, pushes tags upstream, and outputs to the --file.