From 2f61184ad3a6d272f11c5817af0e1ed35b3f2b1c Mon Sep 17 00:00:00 2001 From: James Ives Date: Mon, 4 Mar 2019 10:07:24 -0500 Subject: [PATCH] Minor change --- entrypoint.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index df3874aa..1ee7602e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -40,11 +40,9 @@ git init && \ git config --global user.email "${COMMIT_EMAIL}" && \ git config --global user.name "${COMMIT_NAME}" && \ -## Checks to see if the remote exists prior to deploying -REMOTE_BRANCH = eval `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:JamesIves/reddit-viewer.git" docs` - +# Checks to see if the remote exists prior to deploying. # If the branch doesn't exist it gets created here as an orphan. -if [[ -z $REMOTE_BRANCH ]] +if [ `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:JamesIves/reddit-viewer.git" $BRANCH` ] then echo "Creating remote branch ${BRANCH} as it doesn't exist..." git checkout --orphan $BRANCH && \