@@ -14,6 +14,10 @@ release_patch:
14
14
15
15
release :
16
16
@if [[ -z $$ TAG ]]; then echo " Use release_{major,minor,patch}" ; exit 1; fi
17
+ @if ! type -P pandoc; then echo " Please install pandoc" ; exit 1; fi
18
+ @if ! type -P sponge; then echo " Please install moreutils" ; exit 1; fi
19
+ @if ! type -P http; then echo " Please install httpie" ; exit 1; fi
20
+ @if ! type -P twine; then echo " Please install twine" ; exit 1; fi
17
21
$(eval REMOTE=$(shell git remote get-url origin | perl -ne '/([^\/\:]+\/.+?) (\.git) ? $$ /; print $$ 1' ))
18
22
$(eval GIT_USER=$(shell git config --get user.email) )
19
23
$(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))
@@ -32,14 +36,15 @@ release:
32
36
git commit -m ${TAG} ; \
33
37
git tag --sign --annotate --file $$ TAG_MSG ${TAG}
34
38
git push --follow-tags
35
- http --auth ${GH_AUTH} ${RELEASES_API} tag_name=${TAG} name=${TAG} \
39
+ http --check-status -- auth ${GH_AUTH} ${RELEASES_API} tag_name=${TAG} name=${TAG} \
36
40
body=" $$ (git tag --list ${TAG} -n99 | perl -pe 's/^\S+\s*// if $$ . == 1' | sed 's/^\s\s\s\s//')"
37
41
$(MAKE ) install
38
- http --auth ${GH_AUTH} POST ${UPLOADS_API} /$$(http --auth ${GH_AUTH} ${RELEASES_API}/latest | jq .id ) /assets \
42
+ http --check-status -- auth ${GH_AUTH} POST ${UPLOADS_API} /$$(http --auth ${GH_AUTH} ${RELEASES_API}/latest | jq .id ) /assets \
39
43
name==$$(basename dist/* .whl) label==" Python Wheel" < dist/* .whl
40
44
$(MAKE ) pypi_release
41
45
42
46
pypi_release :
43
- python setup.py sdist bdist_wheel upload --sign
47
+ python setup.py sdist bdist_wheel
48
+ twine upload dist/* .tar.gz dist/* .whl --sign --verbose
44
49
45
50
.PHONY : release
0 commit comments