diff --git a/Makefile b/Makefile index 38a068b8bf9041539ed2e34532207a6b16571f2f..6c1ffd94883c10fb61506709ee40f5449eb15f83 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,5 @@ release: clean darwin mkdir release cd ./bin/darwin; tar -zcvf ../../release/jcli-darwin-amd64.tar.gz jcli - ./tag.sh - @if [[ -z "$NEEDS_TAG" ]]; then \ - hub release create -c -a release/jcli-darwin-amd64.tar.gz $NEW_TAG; \ - fi - clean: ## Clean the generated artifacts rm -rf bin release \ No newline at end of file diff --git a/tag.sh b/tag.sh index 07a6b163d6b5dc106da12732a9ea8f0ae1de447e..0ddaedcb0a8f79731cac3b254a36c0545453b646 100755 --- a/tag.sh +++ b/tag.sh @@ -7,9 +7,13 @@ VNUM2=${VERSION_BITS[1]} VNUM3=${VERSION_BITS[2]} VNUM3=$((VNUM3+1)) -export NEW_TAG="$VNUM1.$VNUM2.$VNUM3" +NEW_TAG="$VNUM1.$VNUM2.$VNUM3" echo "Updating $VERSION to $NEW_TAG" #get current hash and see if it already has a tag GIT_COMMIT=`git rev-parse HEAD` -export NEEDS_TAG=`git describe --contains $GIT_COMMIT` +NEEDS_TAG=`git describe --contains $GIT_COMMIT` + +if [[ -z "${NEEDS_TAG}" ]]; then + echo "hub release create -c -a release/jcli-darwin-amd64.tar.gz v${NEW_TAG}" +fi