Skip to content

Commit

Permalink
Switch release script to twine
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Jan 22, 2019
1 parent 63bced3 commit 304f014
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ release_patch:

release:
@if [[ -z $$TAG ]]; then echo "Use release_{major,minor,patch}"; exit 1; fi
@if ! type -P pandoc; then echo "Please install pandoc"; exit 1; fi
@if ! type -P sponge; then echo "Please install moreutils"; exit 1; fi
@if ! type -P http; then echo "Please install httpie"; exit 1; fi
@if ! type -P twine; then echo "Please install twine"; exit 1; fi
$(eval REMOTE=$(shell git remote get-url origin | perl -ne '/([^\/\:]+\/.+?)(\.git)?$$/; print $$1'))
$(eval GIT_USER=$(shell git config --get user.email))
$(eval GH_AUTH=$(shell if grep -q '@github.com' ~/.git-credentials; then echo $$(grep '@github.com' ~/.git-credentials | python3 -c 'import sys, urllib.parse as p; print(p.urlparse(sys.stdin.read()).netloc.split("@")[0])'); else echo $(GIT_USER); fi))
Expand All @@ -40,6 +44,7 @@ release:
$(MAKE) pypi_release

pypi_release:
python setup.py sdist bdist_wheel upload --sign
python setup.py sdist bdist_wheel
twine upload dist/*.tar.gz dist/*.whl --sign --verbose

.PHONY: release

0 comments on commit 304f014

Please sign in to comment.