Skip to content

Instantly share code, notes, and snippets.

@phuongdh
Created April 12, 2013 16:59
Show Gist options
  • Save phuongdh/5373479 to your computer and use it in GitHub Desktop.
Save phuongdh/5373479 to your computer and use it in GitHub Desktop.
task :update_code do
run "cd #{current_release}; #{sudo :as => 'avalon'} git checkout Gemfile.lock; #{sudo :as => 'avalon'} git checkout config/role_map_development.yml; #{sudo :as => 'avalon'} git pull origin #{branch}"
end
task :migrate do
run "cd #{current_release}; #{sudo :as => 'avalon'} -i bundle exec rake RAILS_ENV=development db:migrate"
end
@cjcolvar
Copy link

task :sudo_test do
run "#{sudo :as => 'avalon'} -i -- sh -c 'cd #{current_release}; bundle exec rake RAILS_ENV=development -T'"
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment