Skip to content

Instantly share code, notes, and snippets.

@kennethkalmer
Created March 6, 2009 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethkalmer/74867 to your computer and use it in GitHub Desktop.
Save kennethkalmer/74867 to your computer and use it in GitHub Desktop.
# 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