Skip to content

Commit

Permalink
create_branch enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharp38 committed Apr 23, 2024
1 parent 3c297d4 commit 3258116
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .tools/create_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,15 @@ if [ "${TARG_BRANCH}" == "stable" ]; then
fi
fi
# Delete target branch & push new one
REM=`git branch -a | grep remotes/${TARG_REPO}/${TARG_BRANCH}`
if [ $? -eq 0 ]; then
# Delete target branch (origin/beta) & push new one
#REM=`git branch -a | grep remotes/${TARG_REPO}/${TARG_BRANCH}`
REM=`git ls-remote ${TARG_REPO} ${TARG_BRANCH}`
#if [ $? -eq 0 ]; then
if [ "${REM}" != "" ]; then
echo "Deleting ${TARG_REPO}/${TARG_BRANCH} branch"
git push -q ${TARG_REPO} --delete ${TARG_BRANCH}
if [ $? -ne 0 ]; then
echo "= ERROR: git push --delete failed"
echo "= ERROR: git push ${TARG_REPO} --delete ${TARG_BRANCH} failed"
exit 33
fi
fi
Expand Down

0 comments on commit 3258116

Please sign in to comment.