diff --git a/build.sh b/build.sh index 6d1922f0a0fc..4851d0ded1e8 100755 --- a/build.sh +++ b/build.sh @@ -12,12 +12,6 @@ if [ -n "$CF_PAGES" ] then echo "We are on Cloudflare Pages. Retrieve branch from env." GIT_BRANCH=$CF_PAGES_BRANCH - - echo "Remove Cloudflare redirect." - # HACK: Remove annoying https redirect. I presume this was used by Cloudflare - insteadof=`git config --list | grep insteadof` - remove=`echo $insteadof | cut -d "=" -f 1` - git config --global --unset $remove fi GIT_COMMIT_MESSAGE="branch $GIT_BRANCH on $DATE" GIT_LIVE_BRANCH=${2:-develop} @@ -71,6 +65,12 @@ echo "Using ssh command: $SSH_COMMAND" if [ -n "$CF_PAGES" ] then + echo "Remove Cloudflare redirect." + # HACK: Remove annoying https redirect. I presume this was used by Cloudflare + insteadof=`git config --list | grep insteadof` + remove=`echo $insteadof | cut -d "=" -f 1` + git config --global --unset $remove + echo "We are on Cloudflare Pages. Setting custom ssh key and method" mkdir ~/.ssh echo "$BUILD_SSH_KEY" > ~/.ssh/id_ed25519