summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVincent Driessen <me@nvie.com>2016-04-24 17:07:41 +0200
committerVincent Driessen <me@nvie.com>2016-04-24 17:07:41 +0200
commit05c468eaec0be6ed5a1beae9d70f51655dfba770 (patch)
tree9ecce0616acbb58708466fa921b1fa2bf41ddef8 /Makefile
parentbc505ddd603b1570c2c1acc224698e1421ca8a6d (diff)
downloadgitpython-05c468eaec0be6ed5a1beae9d70f51655dfba770.tar.gz
Automate steps to upload to PyPI
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..38564f97
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+all:
+ @grep -Ee '^[a-z].*:' Makefile | cut -d: -f1 | grep -vF all
+
+clean:
+ rm -rf build/ dist/
+
+release: clean
+ # Check if latest tag is the current head we're releasing
+ echo "Latest tag = $$(git tag | sort -nr | head -n1)"
+ echo "HEAD SHA = $$(git rev-parse head)"
+ echo "Latest tag SHA = $$(git tag | sort -nr | head -n1 | xargs git rev-parse)"
+ @test "$$(git rev-parse head)" = "$$(git tag | sort -nr | head -n1 | xargs git rev-parse)"
+ make force_release
+
+force_release: clean
+ @which -s twine || echo "Twine not installed, run pip install twine first"
+ git push --tags
+ python setup.py sdist bdist_wheel
+ twine upload dist/*