From de1178ce3f366cb99a2c2682616ed21032829fc7 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Tue, 14 Apr 2015 09:20:24 +0200 Subject: [PATCH] Add Makefile for convenient releasing --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..3149d8d5 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +all: + @grep -Ee '^[a-z].*:' Makefile | cut -d: -f1 | grep -vF all + +clean: + rm -rf build/ dist/ + +release: + # Check if latest tag is the current head we're releasing + echo "Latest tag = $$(git tag | sort -nr | head -n1)" + echo "HEAD SHA = $$(git sha head)" + echo "Latest tag SHA = $$(git tag | sort -nr | head -n1 | xargs git sha)" + @test "$$(git sha head)" = "$$(git tag | sort -nr | head -n1 | xargs git sha)" + make force_release + +force_release: clean + git push --tags + python setup.py sdist bdist_wheel + twine upload dist/*