Skip to content

Commit

Permalink
deploy shell fetch latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
debugly committed Jan 15, 2024
1 parent 9dd8c6d commit ef4d3dd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -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 [email protected]: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

0 comments on commit ef4d3dd

Please sign in to comment.