Created
October 30, 2010 01:00
-
-
Save technicalpickles/654745 to your computer and use it in GitHub Desktop.
capistrano trix to upload `git diff --staged` and `git apply` that, instead of using `:scm: none` with `:deploy_via: copy`
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
| after 'deploy:update_code' do | |
| system("mkdir -p tmp && git diff --staged > #{rails_root}/tmp/staged.diff") | |
| put File.read("#{rails_root}/tmp/staged.diff"), '/tmp/staged.diff' | |
| run "cd #{latest_release} && if test -s /tmp/staged.diff; then git apply /tmp/staged.diff; fi" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment