diff --git a/Makefile b/Makefile index d5c8090..5fe6263 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,8 @@ upload: verify-tag-version build # Uses twine to upload to test pypi .PHONY: upload-test upload-test: build + # Bump version to a post version based on num of commits since last tag to prevent overwriting + $(ENV)/bin/hatch version $(shell git describe --tags | sed 's/-[0-9a-z]*$$//') $(ENV)/bin/hatch publish --repo test # Cleans all build, runtime, and test artifacts diff --git a/pyproject.toml b/pyproject.toml index 5e35f68..7a3a828 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "release-gitter" -version = "2.1.1" +dynamic = ["version"] description = "Easily download releases from sites like Github and Gitea" readme = "README.md" license = "MIT" @@ -34,6 +34,9 @@ release-gitter = "release_gitter:main" [project.urls] Homepage = "https://git.iamthefij.com/iamthefij/release-gitter" +[tool.hatch.version] +path = "release_gitter.py" + [tool.hatch.build] include = ["release_gitter.py", "pseudo_builder.py"] diff --git a/release_gitter.py b/release_gitter.py index 1865433..8bc1579 100755 --- a/release_gitter.py +++ b/release_gitter.py @@ -18,6 +18,8 @@ from zipfile import ZipFile import requests +__version__ = "2.1.1" + class UnsupportedContentTypeError(ValueError): pass