From d82a324db9b3f636f8cdd89d906314790e7fe9e9 Mon Sep 17 00:00:00 2001 From: Arjan Dikhoff Date: Fri, 25 Oct 2024 21:21:16 +0200 Subject: [PATCH] Rearranging --- build.sh | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/build.sh b/build.sh index b7f4460ae613..6d1922f0a0fc 100755 --- a/build.sh +++ b/build.sh @@ -6,13 +6,18 @@ DATE=`date` WORK_DIR=`pwd` REPORT_DIR="$WORK_DIR/build-report" REPORT_FILE="$REPORT_DIR/index.html" -SSH_COMMAND="ssh -v" GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` 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} @@ -60,7 +65,10 @@ cd $REPO_DIR echo "Checking out $GIT_LIVE_BRANCH" git checkout $GIT_LIVE_BRANCH +SSH_COMMAND="ssh" # Add -v, -vv, or -vvv for verbose debugging git config --global core.sshCommand "$SSH_COMMAND" +echo "Using ssh command: $SSH_COMMAND" + if [ -n "$CF_PAGES" ] then echo "We are on Cloudflare Pages. Setting custom ssh key and method" @@ -74,30 +82,18 @@ then chmod 0644 ~/.ssh/known_hosts chmod 0755 ~/.ssh - #git config --global remote.origin.url git@github.com:Redot-Engine/redot-docs-live.git - - # HACK: remove annoying https redirect - insteadof=`git config --list | grep insteadof` - remove=`echo $insteadof | cut -d "=" -f 1` - git config --global --unset $remove - git remote set-url origin git@github.com:Redot-Engine/redot-docs-live.git echo "Setting credentials" git config --global user.email "noreply_pages_bot@cloudflare.com" git config --global user.name "Redot Docs Build Worker" fi -echo "#########################" -cat .git/config -echo "#########################" -ls -la ~/.ssh -cat ~/.ssh/id_ed25519.pub -cat ~/.ssh/known_hosts -ssh -T git@ssh.github.com -echo "#########################" + +echo "### GIT CONFIG VALUES ###" git config --global core.pager cat git config --list +echo "Copying generated content to repository" echo "mkdir -p $BUILD_DIR" mkdir -p $BUILD_DIR echo "cp -r ../$SPHINX_DIR/* $BUILD_DIR"