Add Makefile for convenient releasing

This commit is contained in:
Vincent Driessen 2015-04-14 09:20:24 +02:00
parent 8f7322ed10
commit de1178ce3f
1 changed files with 18 additions and 0 deletions

18
Makefile Normal file
View File

@ -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/*