Auto-generate ChangeLog from git

This commit is contained in:
Adam Spiers 2011-11-24 17:00:33 +00:00
parent 685d449963
commit 00d4e68445
3 changed files with 20 additions and 2 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
.dirstamp
Build
ChangeLog
MYMETA.json
MYMETA.yml
Makefile

View file

@ -3,7 +3,10 @@
dist_bin_SCRIPTS = bin/stow bin/chkstow
info_TEXINFOS = doc/stow.texi
dist_man_MANS = doc/stow.8
dist_doc_DATA = README doc/manual.html doc/manual.pdf
dist_doc_DATA = \
README \
doc/manual.html doc/manual.pdf \
ChangeLog doc/ChangeLog.OLD
# Would be nice to include the split page HTML version of the manual
# in the distribution, but automake doesn't support wildcards and I'm
@ -133,3 +136,17 @@ doc/stow.8: bin/stow Makefile
[ -d doc ] || mkdir doc # required in vpath mode
pod2man $< > $@
ChangeLog: doc/ChangeLog.OLD Makefile
@if [ -d .git ]; then \
( \
git log \
--format="format:%ad %aN <%aE>%n%n * %w(70,0,4)%s%+b%n" \
--name-status \
v2.0.2..HEAD \
| sed 's/^\([A-Z]\)\t/ \1 /'; \
cat $< \
) > $@; \
else \
echo "Not in a git repository; can't update ChangeLog."; \
fi

View file

@ -1,4 +1,4 @@
2008-01-31 Kahlil Hodgson <kal@grebo.cs.rmit.edu.au>
Thu Jan 31 2008 Kahlil Hodgson <kal@grebo.cs.rmit.edu.au>
* stow.texi: Austin Wood and Chris Hoobin clean this up for version 2.