Metadata-Version: 2.4
Name: semtag
Version: 0.3.2
Summary: A tool for managing semantic version tags in git repositories
Author-email: Mateusz Mikrut <mateusz.mikrut@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/mateuszmikrut/semtag
Project-URL: Bug Reports, https://github.com/mateuszmikrut/semtag/issues
Project-URL: Source, https://github.com/mateuszmikrut/semtag
Keywords: git,tags,semantic-versioning,semver,version-control
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gitpython>=3.1.0
Dynamic: license-file

# Semantic Version GIT Tagger

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

## Usage

```bash
semtag [options]
```

### Options

<!-- OPTIONS:START -->
```
  -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
```
<!-- OPTIONS:END -->

### Examples

```bash
# 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)
```bash
pip install semtag
```

Using Homebrew (Mac)

```bash
brew install mateuszmikrut/tap/semtag
```

Using .deb package

```bash
# 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

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