#!/bin/bash
version=$(grep version pyproject.toml  | cut -d '"' -f 2)
tag_update() {
    git tag -m $version $version
    git push --tags
}
pipy() {
    source .venv/bin/activate
    for i in pip hatch build; do
        pip install --upgrade $i
    done
    python3 -m build .
    twine upload dists/*${version}*
}
tag_update
pipy
