tag-release
I'm tired of looking up the correct tag name to use, hence this script. It follows the semantic versioning rules. Should work with any semi-recent Python version.
Usage
-
View usage info:
./src/release.py -h -
Make a new patch version release in the current repo. Tries to parse the latest tag (say, v2.1.3) and will add a new tag (in this case, v2.1.4).
../path/to/tag-release/src/release.py patch -
Make a new minor version release in the current repo (v2.1.3 -> v2.2.0):
../path/to/tag-release/src/release.py minor -
Similar for major versions (v2.1.3 -> v3.0.0):
../path/to/tag-release/src/release.py major -
Accepts path to repository as an optional argument:
./src/release.py patch path/to/your/repo -
You can customize the version prefix ("v" by default). It will search for the latest tag with the given prefix then. For example, this command, given that tag "2.1.3" exists, will create tag "2.1.4":
../path/to/tag-release/src/release.py -p '' patch -
A prefix can be anything, basically; this will create tag "release/v2.2.0" if the latest tag is "release/v2.1.3":
../path/to/tag-release/src/release.py -p 'release/v' minor -
If no tags were found, the implicit version 0.0.0 is assumed. In a repository with no matching tags, this will create tag "v1.0.0":
../path/to/tag-release/src/release.py major -
Customize the tag message:
../path/to/tag-release/src/release.py -m 'Release: version {}' patch -
You can "retag" parent versions. For example, given that the latest tag is "v1.1.3", this will create/update tags "v1" & "v1.1" to point to the new tag "v1.1.4":
../path/to/tag-release/src/release.py -r patch -
Create lightweight tags, if you wish (using annotated tags, which is the default, is almost always the preferred option):
../path/to/tag-release/src/release.py -l patch
License
Distributed under the MIT License. See LICENSE.txt for details.
Metadata
Release files for git-tag-release 0.4.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| git_tag_release-0.4.12.tar.gz | 10.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_tag_release-0.4.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / git_tag_release-0.4.12.tar.gz
| Download URL | git_tag_release-0.4.12.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb06319646993c71b282e29ca7b7d79f92186a81d03b223211bedf137db5d477
|
|
BLAKE2b-256 checksum How to use checksums |
7a2664b505efc48a125ad246c42840c7eea9e8d43d3c83edf4233fa6dfb81de9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / git_tag_release-0.4.12-py3-none-any.whl
| Download URL | git_tag_release-0.4.12-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a951594d99a83c95c0e5864af7c5b0a70ab44c98519921ee5baab0d025539ca4
|
|
BLAKE2b-256 checksum How to use checksums |
ac084cb709b63da60225aba5c595440a1c098c80d091fe1e531084cb8738cd13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|