Created
February 4, 2014 22:06
-
-
Save frankmt/8813291 to your computer and use it in GitHub Desktop.
Script - Spree deployment with asset recompilation
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/sh | |
read -r -p "Confirm deployment to PRODUCTION? Type 'yes' to continue " response | |
if [[ $response == "yes" ]] | |
then | |
# Precompile assets and commit to github | |
bundle exec rake assets:precompile RAILS_ENV=production | |
git add . | |
git commit -m 'recompiling assets' | |
git push origin master | |
# Push to heroku | |
git push heroku master | |
# Run migrations | |
heroku run rake db:migrate --app my-app | |
# Do whatever you need with your app (seeds, data, etc..) | |
# Restart app | |
heroku restart --app my-app | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!!!!