rework building templates

This commit is contained in:
Conduitry
2019-09-26 04:49:31 -04:00
parent 190168b8a1
commit 14cbe7caae
5 changed files with 40 additions and 57 deletions

View File

@@ -1,19 +1,19 @@
#!/bin/bash
cd "$(dirname $0)"
cd "$(dirname "$0")"
if [ "$CI" ]; then
# write out SSH key
[ "$SSH_KEY" ] || exit 1
echo "$SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
(umask 0077; echo "$SSH_KEY" > ~/ssh_key; echo "$SSH_KEY_ROLLUP" > ~/ssh_key_rollup; echo "$SSH_KEY_WEBPACK" > ~/ssh_key_webpack)
git config user.email 'noreply@svelte.dev'
git config user.name '[bot]'
fi
# branch names
DEFAULT=master
ROLLUP=rollup
WEBPACK=webpack
./create-branches.sh $DEFAULT $ROLLUP $WEBPACK
./create-branches.sh $ROLLUP $WEBPACK
# force push rollup and webpack branches
git push git@github.com:sveltejs/sapper-template.git $ROLLUP $WEBPACK -f
# force push rollup and webpack branches and repos
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new -i ~/ssh_key' git push git@github.com:sveltejs/sapper-template.git $ROLLUP $WEBPACK -f
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new -i ~/ssh_key_rollup' git push git@github.com:sveltejs/sapper-template-rollup.git $ROLLUP:master -f
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new -i ~/ssh_key_webpack' git push git@github.com:sveltejs/sapper-template-webpack.git $WEBPACK:master -f