aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2018-04-15 20:00:37 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2018-04-15 20:00:37 +0200
commitaf0d682c84be56792fad47f77cb953a04eff7abd (patch)
tree390b16e9dbc6d6ac285450e47dad4c403d8a05e9
parent6b68a95f1b0ad62baf22578ede4b97d1c93f11f0 (diff)
downloadipaddress-af0d682c84be56792fad47f77cb953a04eff7abd.tar.gz
add a release script
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e73256a..e799f11 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,17 @@ lint:
pypi:
python setup.py sdist bdist_wheel upload
+release:
+ if test -z "${VERSION}"; then echo VERSION missing; exit 1; fi
+ sed -i "s#^\(__version__\s*=\s*'\)[^']*'\$$#\1${VERSION}'#" ipaddress.py
+ sed -i "s#^\(\s*'version':\s*'\)[^']*\('.*\)\$$#\1${VERSION}\2#" setup.py
+ git diff
+ git add ipaddress.py setup.py
+ git commit -m "release ${VERSION}"
+ git tag "v${VERSION}"
+ git push --tags
+ $(MAKE) pypi
+
clean:
rm -rf -- build dist ipaddress.egg-info