提交 b67ae689 编写于 作者: LinuxSuRen's avatar LinuxSuRen

Complate the script

上级 ff73de54
......@@ -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
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册