Automatically create semantic version git tags
Maintained. Last release 3 months ago, commits in 5 of the last 26 weeks. Weaker on commit activity and contributor spread.
pip install release-tagREADME as published on PyPI with version 0.6.1.
Tag Release
Automatically create semantic version git tags.
$ tag
Push tag 'v1.0.1' to origin? (y/N): y
Tag 'v1.0.1' created and pushed to origin.
Usage
By default, tag will increment the smallest digit following SemVer precedence.
Incrementing a specific version is achieved by passing the respective flag: --major, --minor, --patch.
Tags can be automatically pushed to a remote repository by passing --push.
tag supports pre-release versions.
Creating a pre-release tag is achieved by the using the --suffix flag.
For example, --suffix="alpha" will create a tag like v1.0.0-alpha.
If the previous tag was for a pre-release, that suffix is preferred.
This behavior can be overridden by passing --patch or --suffix="".
Only incrementing the trailing pre-release identifier is currently supported.
tag authoritatively discourages duplicate tags for a single commit.
For the most up-to-date options, run tag --help,
$ tag --help
Calculate the next semantic version tag
Usage: tag [OPTIONS] [COMMAND]
Commands:
completion Generate completion script
help Print this message or the help of the given subcommand(s)
Options:
--major increment the major version
--minor increment the minor version
--patch increment the patch version
--push create and push the tag to remote
--print-only print the next tag and exit
--check validate that the tag at HEAD has its previous version as an ancestor
--no-fetch skip fetching tags from remote
--allow-untagged allow HEAD to be untagged when using --check
--debug enable debug logging
--prefix <PREFIX> set a prefix for the tag [default: ""]
--suffix <SUFFIX> set the pre-release suffix (e.g., rc, alpha, beta) [default: ""]
--metadata <METADATA> set the build metadata [default: ""]
--remote <REMOTE> remote repository to push tag to [default: origin]
-v, --version version for tag
-h, --help Print help