diff --git a/Makefile.inc b/Makefile.inc index 6a9219d616..480a899184 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,9 +1,5 @@ # Project name, used to name the binaries PKG_NAME := docker-machine -# Github infos -GITHUB_INFO := $(shell git config --get remote.origin.url | sed -e 's/.*:\(.*\).git/\1/') -GH_USER ?= $(shell echo $(GITHUB_INFO) | cut -d \/ -f 1) -GH_REPO ?= $(shell echo $(GITHUB_INFO) | cut -d \/ -f 2) # If true, disable optimizations and does NOT strip the binary DEBUG ?= diff --git a/mk/release.mk b/mk/release.mk index fdc245f565..b949c83216 100644 --- a/mk/release.mk +++ b/mk/release.mk @@ -9,6 +9,10 @@ release-pack: find ./bin -type d -mindepth 1 -exec zip -r -j {}.zip {} \; release: clean dco fmt test test-long build-x release-pack release-checksum + # Github infos + GH_USER ?= $(shell git config --get remote.origin.url | sed -e 's/.*[:/]\(.*\)\/\([^.]*\)\(.*\)/\1/') + GH_REPO ?= $(shell git config --get remote.origin.url | sed -e 's/.*[:/]\(.*\)\/\([^.]*\)\(.*\)/\2/') + $(if $(GITHUB_TOKEN), , \ $(error GITHUB_TOKEN must be set for github-release))