refactor: move GIT_SSH_COMMAND into local config

This commit is contained in:
Sefa Eyeoglu 2022-02-19 19:05:27 +01:00
parent e9f30a464f
commit 799d5c3b85
No known key found for this signature in database
GPG Key ID: C10411294912A422
3 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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
export DEPLOY_TO_FOLDER=false
export DEPLOY_TO_GIT=true
export GIT_SSH_COMMAND="ssh -i ${BASEDIR}/config/deploy.key"

View File

@ -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