Skip to content

Commit

Permalink
fallback for the old repos
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyliber committed Mar 31, 2022
1 parent 30be545 commit a77c4d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ GIT_COMMAND="git push dokku@$HOST:$PROJECT"

echo "Detect the project default branch: master or main"
DEFAULT_BRANCH="$(git remote show origin | awk '/HEAD branch/ {print $NF}')"

if [ -z "$DEFAULT_BRANCH" ]
then
DEFAULT_BRANCH="master"
fi

echo "Default is $DEFAULT_BRANCH"

if [ -n "$BRANCH" ]; then
Expand Down

0 comments on commit a77c4d0

Please sign in to comment.