Skip to content

Instantly share code, notes, and snippets.

@jackboberg
Created July 3, 2013 14:33
Show Gist options
  • Save jackboberg/5918466 to your computer and use it in GitHub Desktop.
Save jackboberg/5918466 to your computer and use it in GitHub Desktop.
Precompile assets locally and rsync
namespace :deploy do
namespace :assets do
desc 'Run the precompile task locally and rsync with shared'
task :precompile, :roles => :web, :except => { :no_release => true } do
system "RAILS_ENV=development bundle exec rake assets:precompile"
system "rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}"
system "RAILS_ENV=development bundle exec rake assets:clean"
end
task :update_asset_mtimes do
puts 'skipping update_asset_mtimes'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment