Created
December 11, 2011 06:44
-
-
Save pshima/1458915 to your computer and use it in GitHub Desktop.
Capistrano asset hack
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 :assets do | |
task :generate, :except => { :no_release => true }, :roles => :app do | |
desc "Asset copy" | |
run "mkdir #{release_path}/public/oldassets" | |
run "mkdir #{release_path}/public/oldassets/stylesheets" | |
run "mkdir #{release_path}/public/oldassets/javascripts" | |
run "cp -r #{deploy_to}/current/public/stylesheets/* #{release_path}/public/oldassets/stylesheets/" | |
run "cp -r #{deploy_to}/current/public/javascripts/* #{release_path}/public/oldassets/javascripts/" | |
end | |
end | |
after "deploy:update_code", "assets:generate" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment