Skip to main content

A tool for managing semantic version tags in git repositories

Project description

Semantic Version GIT Tagger

A pretty trivial python script to easily manage git tags with semantic versioning (semver.org)

Usage

semtag [options]

Options

  -h, --help         show this help message and exit
  -v, --verbose      Verbosity (-v for INFO, -vv for DEBUG)
  -b, --by BY        Increment by a specific number
  -p, --patch        Increment patch version (x.x.PATCH)
  -m, --minor        Increment minor version (x.MINOR.0)
  -M, --major        Increment major version (MAJOR.0.0)
  -l, --label LABEL  Add label to the version (e.g., -l rc1 creates
                     1.0.0-rc1). Used alone, adds label to current version
  -a, --msg MSG      Annotated tags message
  -u, --push         Push the new tag to remote repository
  -U, --pushall      Push all local tags to remote repository
  -n, --no-fetch     Do not fetch tags from remote before operation

Examples

# Increment minor version and push to origin (1.0.0 -> 1.1.0)
semtag -mu

# Increment major version (1.0.0 -> 2.0.0)
semtag -M

# Increment patch version (1.0.0 -> 1.0.5)
semtag -u -p -b 5

# Increment patch and add label (1.0.0 -> 1.0.1-rc1)
semtag -u -pl rc1

Installation

Using pip (preferred)

pip install semtag

Using Homebrew (Mac)

brew install mateuszmikrut/tap/semtag

Using .deb package

# Latest version
curl -LO "https://github.com/mateuszmikrut/semtag/releases/latest/download/semtag-latest-1_amd64.deb"
sudo dpkg -i semtag-latest-1_amd64.deb

# Specific version
VERSION="1.0.0"  # Replace with desired version
curl -LO "https://github.com/mateuszmikrut/semtag/releases/download/${VERSION}/semtag-${VERSION}-1_amd64.deb"
sudo dpkg -i "semtag-${VERSION}-1_amd64.deb"

Using .rpm package

# Latest version
sudo dnf install https://github.com/mateuszmikrut/semtag/releases/latest/download/semtag-latest-1.x86_64.rpm

# Specific version
VERSION="1.0.0"  # Replace with desired version
sudo dnf install https://github.com/mateuszmikrut/semtag/releases/download/${VERSION}/semtag-${VERSION}-1.x86_64.rpm

From source

git clone https://github.com/mateuszmikrut/semtag.git
cd semtag
python -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
python ./semtag.py

Releases

https://github.com/mateuszmikrut/semtag/releases/

Supported Version Formats

The script supports semantic versioning with the following formats:

  • v1.0.0 (with 'v' prefix)
  • 1.0.0 (without prefix)
  • 1.0.0-rc1 (with prerelease label)

When incrementing versions, prerelease labels are automatically removed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semtag-0.3.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

semtag-0.3.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file semtag-0.3.2.tar.gz.

File metadata

  • Download URL: semtag-0.3.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for semtag-0.3.2.tar.gz
Algorithm Hash digest
SHA256 b056cecf791da91e746ada6376e58b381c5b29ea46686009a6b224dc0c16493f
MD5 fc5665a5544063295cf6d0db6b8d242e
BLAKE2b-256 b88cc3ef263d171ec19df6026fbe3d11a8259a81a835387252d57c9041ae0344

See more details on using hashes here.

Provenance

The following attestation bundles were made for semtag-0.3.2.tar.gz:

Publisher: publish.yml on mateuszmikrut/semtag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file semtag-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: semtag-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for semtag-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 556cd26ebc5c6e3f3c7daa55a1cee4c4ad0945dc2bd3701abc7591e96136056e
MD5 baa013c40a3d753cb995d705e3b5fc38
BLAKE2b-256 6815092a941dd17b748d4db76c1865a689311d78751c416ecce3a3499ea4b052

See more details on using hashes here.

Provenance

The following attestation bundles were made for semtag-0.3.2-py3-none-any.whl:

Publisher: publish.yml on mateuszmikrut/semtag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page