Make meta self-contained

Relevant git and s3 configs and secrets are now taken from a `config` folder.
This commit is contained in:
Petr Mrázek 2017-07-16 05:22:36 +02:00
parent ad98ec2d6c
commit b1113057ad
5 changed files with 22 additions and 5 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ multimc
upstream
__pycache__
*.kdev4
config_local.sh

3
config/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.key
*.pub
s3cmd.cfg

View File

@ -0,0 +1,5 @@
export MODE=master
export GIT_AUTHOR_NAME="Petr Mrázek"
export GIT_AUTHOR_EMAIL="peterix@gmail.com"
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"

8
config/readme.txt Normal file
View File

@ -0,0 +1,8 @@
This is where you should put the git deploy keys.
These are expected:
* meta-multimc.key
* meta-multimc.key.pub
* meta-upstream.key
* meta-upstream.key.pub
* s3cmd.cfg

View File

@ -7,8 +7,8 @@ BASEDIR=`pwd`
set -x
source config.sh
if [ -f config_local.sh ]; then
source config_local.sh
if [ -f config/config_local.sh ]; then
source config/config_local.sh
fi
MODE=${MODE:-develop}
@ -46,7 +46,7 @@ cd "${BASEDIR}/${UPSTREAM_DIR}"
git add mojang/version_manifest.json mojang/versions/* mojang/assets/* forge/*.json liteloader/*.json || fail_in
if ! git diff --cached --exit-code ; then
git commit -a -m "Update ${currentDate}" || fail_in
git push || exit 1
GIT_SSH_COMMAND="ssh -i ${BASEDIR}/config/meta-upstream.key" git push || exit 1
fi
cd "${BASEDIR}"
@ -64,10 +64,10 @@ cd "${BASEDIR}/${MMC_DIR}"
git add index.json org.lwjgl/* net.minecraft/* net.minecraftforge/* com.mumfrey.liteloader/* || fail_out
if ! git diff --cached --exit-code ; then
git commit -a -m "Update ${currentDate}" || fail_out
git push || exit 1
GIT_SSH_COMMAND="ssh -i ${BASEDIR}/config/meta-multimc.key" git push || exit 1
fi
cd "${BASEDIR}"
s3cmd --exclude=".git*" --delete-removed sync ${BASEDIR}/${MMC_DIR}/ ${S3_BUCKET} || exit 2
s3cmd -c ${BASEDIR}/config/s3cmd.cfg --exclude=".git*" --delete-removed sync ${BASEDIR}/${MMC_DIR}/ ${S3_BUCKET} || exit 2
exit 0