Skip to content

Commit

Permalink
fixed missing auth for github push
Browse files Browse the repository at this point in the history
  • Loading branch information
bugy committed Feb 25, 2023
1 parent f2bed5f commit 035b3e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/add_git_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ if [ -z "$TRAVIS_BRANCH" ] || [ -z "$OWNER" ] || [ -z "$GITHUB_TOKEN" ] || [ -z
exit -1
fi

git remote add gh https://${OWNER}:${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git;

if [ "$TRAVIS_BRANCH" == "master" ]; then
export NEW_GIT_TAG='dev'
GIT_TRACE=1 git tag -d 'dev'
GIT_TRACE=1 git push --delete origin 'dev'
git tag -d 'dev'
git push --delete gh 'dev'

elif [ "$TRAVIS_BRANCH" == "stable" ]; then
version=`unzip -qc build/script-server.zip version.txt`
Expand All @@ -26,7 +28,6 @@ else
git config --local user.name 'bugy';
git config --local user.email '[email protected]';
git tag -f "$NEW_GIT_TAG";
git remote add gh https://${OWNER}:${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git;
git push -f gh "$NEW_GIT_TAG";
git remote remove gh;
fi

0 comments on commit 035b3e6

Please sign in to comment.