Skip to content

Instantly share code, notes, and snippets.

@yorzi
Forked from terrbear/write_deploy_log.rb
Created February 24, 2011 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorzi/841653 to your computer and use it in GitHub Desktop.
Save yorzi/841653 to your computer and use it in GitHub Desktop.
save the deploy log to server
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