From 799d5c3b856f861eff3d19bff7e14dcd05e75a23 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sat, 19 Feb 2022 19:05:27 +0100 Subject: [PATCH] refactor: move GIT_SSH_COMMAND into local config --- clone.sh | 3 +++ config/config_local.sh.example | 5 +++-- update.sh | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/clone.sh b/clone.sh index 2c23bcc..50f52b9 100755 --- a/clone.sh +++ b/clone.sh @@ -5,6 +5,9 @@ cd "${BASEDIR}" BASEDIR=`pwd` source config.sh +if [ -f config/config_local.sh ]; then + source config/config_local.sh +fi set -x diff --git a/config/config_local.sh.example b/config/config_local.sh.example index b3954c4..1292af9 100644 --- a/config/config_local.sh.example +++ b/config/config_local.sh.example @@ -3,5 +3,6 @@ export GIT_AUTHOR_NAME="Herpington Derpson" export GIT_AUTHOR_EMAIL="herpderp@derpmail.com" export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" -export DEPLOY_TO_S3=false -export DEPLOY_TO_FOLDER=false \ No newline at end of file +export DEPLOY_TO_FOLDER=false +export DEPLOY_TO_GIT=true +export GIT_SSH_COMMAND="ssh -i ${BASEDIR}/config/deploy.key" diff --git a/update.sh b/update.sh index 5777810..e5b4e2f 100755 --- a/update.sh +++ b/update.sh @@ -53,7 +53,7 @@ if [ "${DEPLOY_TO_GIT}" = true ] ; then upstream_git add liteloader/*.json || fail_in if ! upstream_git diff --cached --exit-code ; then upstream_git commit -a -m "Update ${currentDate}" || fail_in - GIT_SSH_COMMAND="ssh -i ${BASEDIR}/config/deploy.key" upstream_git push || exit 1 + upstream_git push || exit 1 fi fi @@ -77,7 +77,7 @@ if [ "${DEPLOY_TO_GIT}" = true ] ; then if ! polymc_git diff --cached --exit-code ; then polymc_git commit -a -m "Update ${currentDate}" || fail_out - GIT_SSH_COMMAND="ssh -i ${BASEDIR}/config/deploy.key" polymc_git push || exit 1 + polymc_git push || exit 1 fi fi