Created
January 17, 2014 12:14
-
-
Save superp/8472479 to your computer and use it in GitHub Desktop.
Update cms gem in all projects
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 | |
# Settings | |
APP_ROOT="/Volumes/Data/superp/www/fodojo/writers_cms/" | |
PULSAR_ROOT="/Volumes/Data/superp/www/fodojo/pulsar" | |
APPS=(...) | |
APPS_COUNT=${#APPS[*]} | |
BUNDLE_CMD="bundle update writers_cms" | |
GIT_COMMIT_CMD="git commit -am 'update-cms'" | |
GIT_PUSH_CMD='git push origin master' | |
PULSAR_CMD="pulsar -l debug app_name production app:deploy" | |
Bundle () { | |
for (( i=0; i<APPS_COUNT; i++ )) | |
do | |
echo ${APPS[$i]} | |
path=$APP_ROOT${APPS[$i]} | |
cd $path | |
($BUNDLE_CMD; $GIT_COMMIT_CMD; $GIT_PUSH_CMD) | |
done | |
} | |
Pulsar () { | |
cd $PULSAR_ROOT | |
for (( i=0; i<APPS_COUNT; i++ )) | |
do | |
echo ${APPS[$i]} | |
${PULSAR_CMD/app_name/${APPS[$i]}} | |
done | |
} | |
echo "Begin updating wia bundle" | |
Bundle | |
echo "Begin deploing wia pulsar" | |
Pulsar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment