Created
October 31, 2014 20:57
-
-
Save headius/626627fbb0dc16047959 to your computer and use it in GitHub Desktop.
bash function to generate a ruby-core changelog entry from most recent git commit
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
~/projects/ruby $ changelog | |
Fri Oct 31 15:56:46 2014 Charles Oliver Nutter <headius@headius.com> | |
* object.c: Make a meaningless change to test changelog script. |
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
#!/bin/bash | |
changelog() | |
{ | |
TZ=jst | |
git log --pretty=format:"%cd %an <%ae>%n%n%B" --date=local -1 | \ | |
ruby -n -e '$i ||= 0; puts "#{$i>1?"\t":""}#{$_}"; $i+=1' | |
unset TZ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment