Last active
January 30, 2017 23:00
-
-
Save renesansz/125bdb4ed16bd3433ebe8724ae9bf234 to your computer and use it in GitHub Desktop.
LiiRN project run script for testers
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
#!/bin/bash | |
SSH_FILE=$HOME/.ssh/liirn | |
LIIRN_PLATFORM="$HOME/Documents/Work/Project-LIIRN/platform" | |
LIIRN_APPS=$LIIRN_PLATFORM/web/docker_django/apps | |
LIIRN_LANDING=$LIIRN_APPS/liirn_landing | |
LIIRN_DASHBOARD=$LIIRN_APPS/liirn_assessment/liirn_dashboard | |
# Load SSH for LiiRN | |
ssh-add -D | |
ssh-add $SSH_FILE | |
# HAJIME! | |
# Update platform | |
cd $LIIRN_PLATFORM | |
git fetch origin | |
git checkout develop | |
git rebase origin/develop | |
# Update landing app and rebuild assets | |
cd $LIIRN_LANDING | |
git fetch origin | |
git checkout develop | |
git rebase origin/develop | |
npm install | |
gulp | |
# Update assessment/dashboard app and rebuild assets | |
cd $LIIRN_DASHBOARD | |
git fetch origin | |
git checkout develop | |
git rebase origin/develop | |
npm install | |
gulp | |
# Update requirements and migrations | |
docker exec platform_web_1 bash -c "/usr/local/bin/pip install -r /usr/src/app/requirements.txt" | |
docker exec platform_web_1 bash -c "/usr/local/bin/python /usr/src/app/manage.py migrate" | |
docker exec platform_web_1 bash -c "/usr/local/bin/python /usr/src/app/manage.py loaddata /usr/src/app/docker_django/apps/liirn_landing/fixtures/liirn_landing.json" | |
# RUN BROWSER | |
python -mwebbrowser http://localhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment