Created
September 17, 2009 23:23
-
-
Save donnoman/188784 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
# Helper to execute blocks of shell commands via capistrano run | |
def run_chunk(cmd,options={}) | |
run cmd.split("\n").map {|l| l.strip }.join(" "), options | |
end | |
# Example | |
task :revision, :roles => [:app] do | |
run_chunk %Q{ | |
cd #{current_release}; | |
cp REVISION public/REVISION; | |
git config --list | grep branch\.deploy >> public/REVISION; | |
git --no-pager log --stat --no-merges --no-color master.. >> public/REVISION; | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment