Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# you'd obviously have more settings somewhere
set :repository, "git@github.com:defunkt/github.git"
set :branch, "origin/master"
namespace :deploy do
desc "Deploy the MFer"
task :default do
update
restart
cleanup
end
desc "Setup a GitHub-style deployment."
task :setup, :except => { :no_release => true } do
run "git clone #{repository} #{current_path}"
end
desc "Update the deployed code."
task :update_code, :except => { :no_release => true } do
run "cd #{current_path}; git fetch origin; git reset --hard #{branch}"
end
desc "Rollback a single commit."
task :rollback, :except => { :no_release => true } do
set :branch, "HEAD^"
default
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.