diff --git a/common.mk b/common.mk index 5653c1ec..d7aa1584 100644 --- a/common.mk +++ b/common.mk @@ -19,7 +19,7 @@ release: @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 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)) $(eval RELEASES_API=https://api.github.com/repos/${REMOTE}/releases)