Created
June 16, 2009 23:21
-
-
Save andyferra/130977 to your computer and use it in GitHub Desktop.
Consolidate pre-deployment tasks before shipping to Heroku
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
namespace :heroku do | |
desc "Deploy to Heroku" | |
task :deploy => :prepare_deployment do | |
system <<-EOF | |
git push heroku master | |
EOF | |
end | |
task :update_asset_packages do | |
system <<-EOF | |
rake asset:packager:build_all | |
git commit -am 'updated packaged assets' | |
EOF | |
end | |
task :update_sass do | |
system <<-EOF | |
rake sass:update | |
git commit -am 'updated stylesheets and assets' | |
EOF | |
end | |
task :prepare_deployment do | |
system <<-EOF | |
rake heroku:update_asset_packages | |
rake heroku:update_sass | |
EOF | |
end | |
end |
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
# Supresses automatic updates of SASS so as not to offend your Heroku slug | |
Sass::Plugin.options[:never_update] = true |
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
namespace :sass do | |
desc 'Update SASS Stylesheets' | |
task :update => :environment do | |
Sass::Plugin.update_stylesheets | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment