Created
August 5, 2009 02:30
-
-
Save defunkt/162444 to your computer and use it in GitHub Desktop.
This file contains 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
# you'd obviously have more settings somewhere | |
set :repository, "[email protected]: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