-
-
Save m3talsmith/268233 to your computer and use it in GitHub Desktop.
A Capistrano Recipe using Git as the folder structure, not just the scm.
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
# 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