Skip to content

Commit

Permalink
Add the ease of "make release"
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Dec 21, 2015
1 parent aaf0e92 commit 14302da
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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 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/*

0 comments on commit 14302da

Please sign in to comment.