Skip to content

Instantly share code, notes, and snippets.

@pshima
Created December 11, 2011 06:44
Show Gist options
  • Save pshima/1458915 to your computer and use it in GitHub Desktop.
Save pshima/1458915 to your computer and use it in GitHub Desktop.
Capistrano asset hack
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