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 easely manage git tags with semantic versioning (semver.org)

Usage

semtag [options]

Options

  • -p, --patch - Increment patch version (x.x.PATCH)
  • -m, --minor - Increment minor version (x.MINOR.0)
  • -M, --major - Increment major version (MAJOR.0.0)
  • -b, --by - Increment by a specific number (default: 1)
  • -l, --label - Add label to the version (e.g., -l rc1 creates 1.0.0-rc1)
  • -u, --push - Push the new tag to remote repository
  • -n, --nofetch - Do not fetch tags from remote prior creating new one
  • -v, --verbose - Increase verbosity (use -v, -vv, or -vvv for more detail)

Examples

# Increment minor version (1.0.0 -> 1.1.0)
semtag -m

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

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

# Increment patch and add label (1.0.0 -> 1.0.1-rc1), don't fetch and push new tag
semtag -n -u -p -l rc1

Installation

Using pip (preferred)

pip install semtag

From git

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

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.1.2.tar.gz (6.8 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.1.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for semtag-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4616fa94be6f4709b21589bc7ba7df7c72ad71d03289a266ad8f89a56d9f3c50
MD5 a9d6703640390d3c06c302da03af66ff
BLAKE2b-256 60f460a3f76d2967e0a23340081f74e4a79d930a33f51e52b5d96c3428b6fcdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for semtag-0.1.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.1.2-py3-none-any.whl.

File metadata

  • Download URL: semtag-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4ef49bbdf7da5487828b632d3e3923366f8d3712ee29dbe290465578ab423f51
MD5 bfc5980646c1833c362f182377b7912e
BLAKE2b-256 235a922ac7f2e3df0dab9275dc5d3281255ce7bbeafa4b6d6e5afe1d0753560f

See more details on using hashes here.

Provenance

The following attestation bundles were made for semtag-0.1.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