Skip to content

Instantly share code, notes, and snippets.

@shreyas-satish
Created September 10, 2012 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shreyas-satish/3690836 to your computer and use it in GitHub Desktop.
Save shreyas-satish/3690836 to your computer and use it in GitHub Desktop.
Rake task for deployment
require 'jammit'
namespace :deploy do
def run(*cmd)
system(*cmd)
raise "Command #{cmd.inspect} failed!" unless $?.success?
end
task :prod do
run "git pull"
run "bundle install"
run "bundle exec rake db:migrate"
run "cd #{Rails.root}; RAILS_ENV=production script/delayed_job restart"
run "bundle exec compass compile"
run "jammit --base-url='http://technagara.in' --force"
run "touch tmp/restart.txt"
run "curl -I http://technagara.in"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment