Skip to content

Instantly share code, notes, and snippets.

@dminchev
Created July 4, 2012 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dminchev/3047916 to your computer and use it in GitHub Desktop.
Save dminchev/3047916 to your computer and use it in GitHub Desktop.
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
%x{bundle exec rake assets:precompile}
%x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{location}:#{shared_path}}
%x{bundle exec rake assets:clean}
end
end
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path, 'tmp', 'restart.txt')}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment