Automatically create semantic version git tags
Project description
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 [flags]
tag [command]
Available Commands:
completion Generate completion script
help Help about any command
Flags:
--check validate that the tag at HEAD has its previous version as an ancestor
--debug enable debug logging
-h, --help help for tag
--major increment the major version
--metadata string set the build metadata
--minor increment the minor version
--patch increment the patch version
--prefix string set a prefix for the tag
--print-only print the next tag and exit
--push create and push the tag to remote
--remote string remote repository to push tag to (default "origin")
--suffix string set the pre-release suffix (e.g., rc, alpha, beta)
-v, --version version for tag
Use "tag [command] --help" for more information about a command.
Autocomplete
tag provides autocomplete for bash, fish, powershell and zsh shells.
For example, to enable autocomplete for the bash shell,
tag completion bash | sudo tee /etc/bash_completion.d/tag > /dev/null
Note: bash completion requires the bash-completion package be installed.
For more information, see tag completion <shell> --help for your respective <shell>.
Install
AUR:
tag is available from the Arch User Repository.
yay -S release-tag
pip:
tag is available as a pypi package.
pip install release-tag
go:
go install github.com/jmelahman/tag@latest
github:
Prebuilt packages are available from Github Releases.
Pre-commit
In your .pre-commit-config.yaml,
default_install_hook_types:
- pre-push
repos:
- repo: https://github.com/jmelahman/tag
rev: a069af54b5de5379d3581e3fc027395d1ad0a982 # frozen: v0.5.0
hooks:
- id: tag-check
By default, it only runs on the pre-push stage,
so you may need to install the pre-push hook after staging your changes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file release_tag-0.5.2-py3-none-win_arm64.whl.
File metadata
- Download URL: release_tag-0.5.2-py3-none-win_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f26b008e0be0c7a122acd8fcb1bb5c822f38e77fed0c0bf6c550cc226c6bf14
|
|
| MD5 |
e438a1139973030951fa4b18d1b805ca
|
|
| BLAKE2b-256 |
dd6f832c2023a8bd8414c93452bd8b43bf61cedfa5b9575f70c06fb911e51a29
|
File details
Details for the file release_tag-0.5.2-py3-none-win_amd64.whl.
File metadata
- Download URL: release_tag-0.5.2-py3-none-win_amd64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3c0629d373a16b9a3da965e89fca893640ce9878ec548865df3609b70989a89
|
|
| MD5 |
01c728638adc7a0c357f75f80ebbe10b
|
|
| BLAKE2b-256 |
79a35b51b0cbdbf2299f545124beab182cfdfe01bf5b615efbc94aee3a64ea67
|
File details
Details for the file release_tag-0.5.2-py3-none-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: release_tag-0.5.2-py3-none-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e302ed60c2bf8b7ba5634842be28a27d83cec995869e112b0348b3f01a84ff5
|
|
| MD5 |
892b1cffa5c72fcbc0187ee4a8d69040
|
|
| BLAKE2b-256 |
6a309087825696271012d889d136310dbdf0811976ae2b2f5a490f4e437903e1
|
File details
Details for the file release_tag-0.5.2-py3-none-manylinux_2_17_aarch64.whl.
File metadata
- Download URL: release_tag-0.5.2-py3-none-manylinux_2_17_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8b60453218d6926da1fdcb99c2e17c851be0d7ab1975e97951f0bff5f32b565
|
|
| MD5 |
3e257775ede214ea17d17cbe4acb77fa
|
|
| BLAKE2b-256 |
45687543e9daa0dfd41c487bf140d91fd5879327bb7c001a96aa5264667c30a1
|
File details
Details for the file release_tag-0.5.2-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: release_tag-0.5.2-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa3d7e495a0c516858a81878d03803539712677a3d6e015503de21cce19bea5e
|
|
| MD5 |
efdea5333e3d6beded14cc24fca75e35
|
|
| BLAKE2b-256 |
98e6769f8be94304529c1a531e995f2f3ac83f3c54738ce488b0abde75b20851
|
File details
Details for the file release_tag-0.5.2-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: release_tag-0.5.2-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fbc61ff7bac2b96fab09566ec45c6508c201efc3f081f57702e1761bbc178d5
|
|
| MD5 |
d9a59e16c61308d7a895694f862f4ab2
|
|
| BLAKE2b-256 |
4f7781fb42a23cd0de61caf84266f7aac1950b1c324883788b7c48e5344f61ae
|
File details
Details for the file release_tag-0.5.2-py3-none-any.whl.
File metadata
- Download URL: release_tag-0.5.2-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e9ca7618bcfc63ad7a0728c84bbad52ef82d07586c4cc11365b44ea8f588069
|
|
| MD5 |
a90a017712f9dfb54b05f5f5de554d53
|
|
| BLAKE2b-256 |
ab9201192a540b29cfadaa23850c8f6a2041d541b83a3fa1dc52a5f55212b3b6
|