Skip to content

Instantly share code, notes, and snippets.

@marksim
Last active August 29, 2015 14:02
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 marksim/8169b00130e6f2c800f6 to your computer and use it in GitHub Desktop.
Save marksim/8169b00130e6f2c800f6 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
version = ARGV.first
if version
releases = `heroku releases -n 50 --remote=production | grep Deploy | grep -A1 #{ARGV.first}`
commits = releases.split("\n").reverse.map {|r| r.split(/\s/)[3] }.join('..')
command = 'git log --pretty=format:"%h - %an, %ar : %s" ' + commits
puts `#{command}`
else
puts "A version is required: ex: release_notes v191"
puts `heroku releases --remote=production`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment