Skip to content

Commit 27711e8

Browse files
author
Travis CI
committed
fixing missing branch push
1 parent 252db2c commit 27711e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

github-cli.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ create_tag(){
6969
git commit -a -m "Releasing ${APP_VERSION}" || true
7070
git tag ${APP_VERSION}
7171

72-
REMOTE="https://${REPO_TOKEN}@github.com/${USERNAME}/${REPOSITORY}.git"
73-
git push "$REMOTE" "$CURRENT_BRANCH" --tags
72+
local REMOTE="https://${REPO_TOKEN}@github.com/${USERNAME}/${REPOSITORY}.git"
73+
local LAST_COMMIT=$(git log --oneline | awk '{print $1}' | head -n1)
74+
git push "$REMOTE" "$LAST_COMMIT:$CURRENT_BRANCH" --tags
7475
git status
75-
echo "> Pushed" >&2
76+
echo "> Pushed ${LAST_COMMIT} to ${CURRENT_BRANCH}" >&2
7677
}
7778

7879
USERNAME="$2"

0 commit comments

Comments
 (0)