Created
September 10, 2012 13:13
-
-
Save shreyas-satish/3690836 to your computer and use it in GitHub Desktop.
Rake task for deployment
This file contains hidden or 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
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