From 4417c0b5de57592be695aa287be586db8e1c4ea8 Mon Sep 17 00:00:00 2001 From: Demetry Pascal Date: Wed, 27 Dec 2023 11:47:48 +0000 Subject: [PATCH] update to 1.0.0 --- Makefile | 12 ++++++++++++ increase-version.sh | 11 +++++++++++ pypi | 3 +++ setup.py | 4 +++- tag.sh | 4 ++++ version.txt | 1 + 6 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 increase-version.sh create mode 100755 pypi create mode 100644 tag.sh create mode 100644 version.txt diff --git a/Makefile b/Makefile index 4062ea7..b391f97 100644 --- a/Makefile +++ b/Makefile @@ -38,3 +38,15 @@ wheel-push: bash wheel-push.sh pypi: wheel wheel-push + + +tag: + bash tag.sh + +release: + bash increase-version.sh + make pypi + git add . + git commit -m 'update to $(shell cat version.txt)' + git push + diff --git a/increase-version.sh b/increase-version.sh new file mode 100644 index 0000000..c496445 --- /dev/null +++ b/increase-version.sh @@ -0,0 +1,11 @@ + +# https://stackoverflow.com/a/10638555/13119067 + +v="$(cat version.txt)" +pre="${v%.*}" +post="${v##*.}" + +(( post += 1 )) + +echo "$pre.$post" > version.txt + diff --git a/pypi b/pypi new file mode 100755 index 0000000..43c20d2 --- /dev/null +++ b/pypi @@ -0,0 +1,3 @@ + +PYPI_USERNAME=__token__ +PYPI_PASSWORD=pypi-AgEIcHlwaS5vcmcCJDdlOTQ5ZDQzLWEwN2MtNGQ3YS05ZjA3LWRjNTc2NjU5MDYwYgACKlszLCI5NzY0NjMwOC0yYmIzLTRjNTEtOGYwNy0zYjUyMDgwOWE1NmEiXQAABiBFToEpV5LgZxrSyoNVX5qVCoyit0wCGLHVEtgY343RPw diff --git a/setup.py b/setup.py index 3161c8a..3afad25 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,6 @@ +from pathlib import Path + import setuptools @@ -14,7 +16,7 @@ def parse_requirements(requirements: str): setuptools.setup( name="toml_union", - version="1.0.0", + version=Path('version.txt').read_text(encoding='utf-8'), author="Demetry Pascal", author_email="qtckpuhdsa@gmail.com", maintainer='Demetry Pascal', diff --git a/tag.sh b/tag.sh new file mode 100644 index 0000000..75d3d1b --- /dev/null +++ b/tag.sh @@ -0,0 +1,4 @@ + +git tag "$(cat version.txt)" +git push --tags + diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..7dea76e --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.0.1