Created
October 25, 2018 15:20
-
-
Save GuyHarwood/cf72689c1fbe4f48508bf1aece71f8fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
CWD=$(pwd) | |
# deploy app1 | |
ADMIN_APP="${CWD}/app1" | |
TEMP_DIR=$(mktemp -d) | |
cd ${TEMP_DIR} | |
cp -a "${ADMIN_APP}" . | |
cd admin | |
rm -rf node_modules package-lock.json | |
git init | |
git add -A | |
git commit -q -m 'deploying app1' | |
heroku git:remote -a my-app | |
git push -f heroku master | |
cd ${CWD} | |
rm -rf ${TEMP_DIR} | |
# deploy app2 | |
APP="${CWD}/app2" | |
TEMP_DIR=$(mktemp -d) | |
cd ${TEMP_DIR} | |
cp -a "${APP}" . | |
cd pupil | |
rm -rf node_modules package-lock.json | |
git init | |
git add -A | |
git commit -q -m 'deploying app2' | |
heroku git:remote -a my-app-2 | |
git push -f heroku master | |
cd ${CWD} | |
rm -rf ${TEMP_DIR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment