From ef4d3ddb6419fc6580a90c776936653972754d40 Mon Sep 17 00:00:00 2001 From: qianlongxu Date: Mon, 15 Jan 2024 17:09:44 +0800 Subject: [PATCH] deploy shell fetch latest tag --- deploy.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deploy.sh b/deploy.sh index 615762821f..29ce2f8bc9 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,16 +1,17 @@ #!/bin/sh # deploy lastest tag and master branch to github. -url=$(git remote get-url github >/dev/null) +url=$(git remote get-url github >/dev/null 2>&1) if [[ $? -ne 0 ]]; then echo 'add github remote' git remote add github git@github.com:debugly/ijkplayer.git fi -tag=$(git describe --abbrev=0) +echo '=== will getch github tags ===' +git fetch github --tag echo '=== will push master branch to github ===' git push github master -echo "=== will push ${tag} tag to github ===" -git push github ${tag} --force - +tag=$(git describe --abbrev=0 --tags) +echo "=== latest tag is ${tag} ===" +#git push github ${tag} --force git remote remove github \ No newline at end of file