Created
July 14, 2010 00:17
-
-
Save oremj/474794 to your computer and use it in GitHub Desktop.
zamboni update script
This file contains hidden or 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 | |
ZAMBONI_DIR=$1 | |
TAG=$2 | |
VENDOR=$3 | |
if [[ ! -d $ZAMBONI_DIR ]] | |
then | |
exit | |
fi | |
cd $ZAMBONI_DIR | |
set -x | |
git fetch -t origin | |
git checkout $TAG | |
git submodule update --init | |
set +x | |
if [[ $VENDOR == '-v' ]] | |
then | |
set -x | |
pushd vendor > /dev/null | |
git fetch -t origin | |
git checkout $TAG | |
git submodule update --init | |
popd > /dev/null | |
set +x | |
fi | |
read -p "Compess assets? [y/n]: " COMPRESS_ASSETS | |
if [[ $COMPRESS_ASSETS == 'y' ]] | |
then | |
python26 manage.py compress_assets | |
fi | |
read -p "Run schematic? [y/n]: " RUN_SCHEMATIC | |
if [[ $RUN_SCHEMATIC == 'y' ]] | |
then | |
schematic migrations | tee /tmp/migrations-$(date +"%Y%m%d%H%M%S").out | |
fi | |
read -p 'Push live? [y/n]: ' PUSHIT | |
if [[ $PUSHIT == 'y' ]] | |
then | |
/data/bin/omg_push_zamboni_live.sh | |
read -p 'Push and restart celeryd? [y/n]: ' CELERY | |
if [[ $CELERY == 'y' ]] | |
then | |
/data/bin/issue-multi-command.py amo_gearman '/data/bin/libget/get-php5-www-git.sh; service celeryd-prod reload' | |
fi | |
/data/bin/issue-multi-command.py amo /data/bin/libget/get-php5-www-git.sh | |
/data/bin/issue-multi-command.py -c 1 amo apachectl graceful | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment