Metadata-Version: 2.4
Name: semvergit
Version: 0.5.0
Summary: Manage your project's version numbers.
Author-email: Roy Moore <roy@moore.co.il>
License: MIT License
        
        Copyright (c) 2023 Roy Moore
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/Tranquility2/semvergit
Project-URL: repository, https://github.com/Tranquility2/semvergit
Keywords: packaging,publishing,release,versioning
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gitpython<4,>=3.1.44
Requires-Dist: semver<4,>=3.0.2
Requires-Dist: loguru<1,>=0.7.0
Requires-Dist: click<9,>=8.1
Provides-Extra: dev
Requires-Dist: astroid==4.0.4; extra == "dev"
Requires-Dist: bandit==1.9.4; extra == "dev"
Requires-Dist: black==26.3.1; extra == "dev"
Requires-Dist: cfgv==3.5.0; extra == "dev"
Requires-Dist: click==8.3.1; extra == "dev"
Requires-Dist: dill==0.4.1; extra == "dev"
Requires-Dist: distlib==0.4.0; extra == "dev"
Requires-Dist: filelock==3.25.2; extra == "dev"
Requires-Dist: identify==2.6.18; extra == "dev"
Requires-Dist: isort==8.0.1; extra == "dev"
Requires-Dist: librt==0.8.1; extra == "dev"
Requires-Dist: markdown-it-py==4.0.0; extra == "dev"
Requires-Dist: mccabe==0.7.0; extra == "dev"
Requires-Dist: mdurl==0.1.2; extra == "dev"
Requires-Dist: mypy==1.20.0; extra == "dev"
Requires-Dist: mypy-extensions==1.1.0; extra == "dev"
Requires-Dist: nodeenv==1.10.0; extra == "dev"
Requires-Dist: packaging==26.0; extra == "dev"
Requires-Dist: pathspec==1.0.4; extra == "dev"
Requires-Dist: platformdirs==4.9.4; extra == "dev"
Requires-Dist: pre-commit==4.5.1; extra == "dev"
Requires-Dist: pygments==2.20.0; extra == "dev"
Requires-Dist: pylint==4.0.5; extra == "dev"
Requires-Dist: python-discovery==1.2.1; extra == "dev"
Requires-Dist: pytokens==0.4.1; extra == "dev"
Requires-Dist: pyyaml==6.0.3; extra == "dev"
Requires-Dist: rich==14.3.3; extra == "dev"
Requires-Dist: stevedore==5.7.0; extra == "dev"
Requires-Dist: tomli==2.4.1; extra == "dev"
Requires-Dist: tomlkit==0.14.0; extra == "dev"
Requires-Dist: typing-extensions==4.15.0; extra == "dev"
Requires-Dist: virtualenv==21.2.0; extra == "dev"
Provides-Extra: test
Requires-Dist: coverage==7.13.5; extra == "test"
Requires-Dist: exceptiongroup==1.3.1; extra == "test"
Requires-Dist: iniconfig==2.3.0; extra == "test"
Requires-Dist: packaging==26.0; extra == "test"
Requires-Dist: pluggy==1.6.0; extra == "test"
Requires-Dist: pygments==2.20.0; extra == "test"
Requires-Dist: pytest==9.0.2; extra == "test"
Requires-Dist: pytest-cov==7.1.0; extra == "test"
Requires-Dist: tomli==2.4.1; extra == "test"
Requires-Dist: typing-extensions==4.15.0; extra == "test"
Dynamic: license-file

|||
|-|-|
| CI/CD   | [![Pytest](https://github.com/Tranquility2/semvergit/actions/workflows/pytest.yml/badge.svg)](https://github.com/Tranquility2/semvergit/actions/workflows/pytest.yml) [![Publish](https://github.com/Tranquility2/semvergit/actions/workflows/publish.yml/badge.svg)](https://github.com/Tranquility2/semvergit/actions/workflows/publish.yml) ![GitHub Latest Release)](https://img.shields.io/github/v/release/Tranquility2/semvergit?logo=github) [![Coverage Status](https://coveralls.io/repos/github/Tranquility2/semvergit/badge.svg)](https://coveralls.io/github/Tranquility2/semvergit) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)|
| Package | [![PyPI - Version](https://img.shields.io/pypi/v/semvergit.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/semvergit/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/semvergit.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/semvergit/) [![Downloads](https://img.shields.io/pypi/dm/semvergit.svg?logo=python&label=PyPI&logoColor=gold)](https://pepy.tech/project/semvergit) |
| Meta    | [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint) [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) |

# semvergit
![semvergit](https://raw.githubusercontent.com/Tranquility2/semvergit/master/assets/semvergit-255.png)

semvergit is a CLI tool to manage your project's version numbers.
It uses [Semantic Versioning](https://semver.org/) 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*

<sup>*Please see the [limitations](#Limitations) section below</sup>

## 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.

```shell
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](CONTRIBUTING.md)

## License

This project is published under the MIT license.

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