-
-
Save yorzi/841653 to your computer and use it in GitHub Desktop.
save the deploy log to server
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
alias :pputs :puts | |
def puts(str = "") | |
pputs(str) | |
$out << "#{str}" | |
end | |
STDOUT.instance_eval do | |
alias :pputs :puts | |
def puts(str = "") | |
pputs(str) | |
$out << "#{str}" | |
end | |
end | |
$stderr.instance_eval do | |
alias :pputs :puts | |
def puts(str = "") | |
pputs(str) | |
$out << "#{str}" | |
end | |
end | |
task :write_deploy_log, :roles => :app, :except => {:no_release => true} do | |
put $out, "#{deploy_to}/current/deploy.log", :mode => 0644 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment