Skip to main content
CI/CD Pytest Publish GitHub Latest Release) Coverage Status pre-commit
Package PyPI - Version PyPI - Python Version Downloads
Meta Code style: black security: bandit Imports: isort linting: pylint Checked with mypy License - MIT

semvergit

semvergit

semvergit is a CLI tool to manage your project's version numbers. It uses Semantic Versioning to bump the version number. The supported bump types are:

  • major
  • minor
  • patch
  • prerelease

Internal Workflow

What's actully happening when you run this tool

  1. Use the latest git tag to determine the current version number.
  2. Bump the version number
  3. Create a new git tag
  4. Push the tag to the remote

Why?

I created this tool to help me manage my project's version numbers. I wanted a simple tool that I could use in my CI/CD pipeline to bump the version number and tag the commit.

Features

❇️ Bump the version number and update the git tag in one command ❇️ Dry run mode ❇️ Verbose mode ❇️ Custom commit message* ❇️ Auto commit message* 🆕 Version 0.4+ introduces the ability to automatically update the version number in a file*

*Please see the limitations section below

How to use

Simple install using pip install semvergit

Then you can use it in your project as simply as: semvergit -t patch -v (to bump the patch version) This will:

  1. create the relvant tag (in this case a patch bump 0.0.x -> 0.0.x+1)
  2. push it to the remote

Please checkout semvergit --help for more info.

Usage: semvergit [OPTIONS] COMMAND [ARGS]...

  CLI for semvergit.

Options:
  --version                Show the version and exit.
  -d, --dry_run            Dry run
  -v, --verbose            Verbose level  [0<=x<=2]
  -t, --bump_type TEXT     Bump Type ['major', 'minor', 'patch', 'prerelease']
  -m, --message TEXT       Commit message
  -am, --auto_message      Auto commit message
  -f, --version_file FILE  Version file
  --help                   Show this message and exit.

Limitations

Please keep in mind that when using features like commit message / auto commit message and version file the tool will try and commit the changes to the git repo.

Even though this is quite handy, it should be used mannually as it cannot be used directly in a CI/CD pipeline directed at master or main branches as it will likly fail due to the commit not being allowed without a PR.

💡 Only git tags can be pushed to the remote without a PR (and this is the main use case for this tool).

Development

Please see CONTRIBUTING.md

License

This project is published under the MIT license.

If you do find it useful, please consider contributing your changes back upstream.

Metadata

Release files for semvergit 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for semvergit 0.5.0
File Size Uploaded Provenance Actions
semvergit-0.5.0.tar.gz 17.0 kB Without provenance Details for semvergit-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for semvergit 0.5.0
File Interpreter ABI Platform Actions
semvergit-0.5.0-py3-none-any.whl Python 3 none any Details for semvergit-0.5.0-py3-none-any.whl

Total release size: 27.3 kB

Release files / semvergit-0.5.0.tar.gz

Download URL semvergit-0.5.0.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f1d72c9c400e91827ec9ef045c314079d09b236f5b1294a5930c9300fc517157
BLAKE2b-256 checksum
How to use checksums
dac8a075f4809382dd744fd4d221956c6666362f2a170448ed2ed1a07a9db7dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / semvergit-0.5.0-py3-none-any.whl

Download URL semvergit-0.5.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdc63e7df3faf62b0f6fcfe1f3f8b29f556895b4f1467f8606a3989b5719df46
BLAKE2b-256 checksum
How to use checksums
d075b4b458d081db6b828ffbd9cb87aa11b161a70f9abfb06d397c3ae123beae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for semvergit 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page