Created
March 6, 2009 11:17
-
-
Save kennethkalmer/74867 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
# Environment | |
export RAILS_ENV=test | |
cp ../database.yml config/ | |
# Re-create | |
mysql -u root -e "DROP DATABASE powerdns_cruise" | |
mysql -u root -e "CREATE DATABASE powerdns_cruise" | |
COMMANDS=( | |
"rake db:migrate" | |
"rake db:seed" | |
"rake spec" | |
"rake features" | |
) | |
index=0 | |
while [ $index -lt ${#COMMANDS[*]} ] | |
do | |
echo "Running command: ${COMMANDS[$index]}" | |
${COMMANDS[$index]} | |
if [ $? -ne 0 ]; then | |
echo "${COMMANDS[$index]} failed! ($?)" | |
exit 1 | |
fi | |
index=`expr $index + 1` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment