Skip to content

Instantly share code, notes, and snippets.

@jacqui
Created May 6, 2009 23:17
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 jacqui/107806 to your computer and use it in GitHub Desktop.
Save jacqui/107806 to your computer and use it in GitHub Desktop.
remote_task :new_stuff, :roles => :app do
# fetch the last line of revisions.log
output = run "tail -n1 #{deploy_to}/revisions.log"
time = output.strip.split.last
# format time for git, which is picky about these things
time = "#{time[0,4]}-#{time[4,2]}-#{time[6,2]}.#{time[8,6]}"
revisions = `git rev-list --all --after='#{time}'`
puts "undeployed revisions:\n#{revisions}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment