lasttag=$$tag; \
done)
+# Author/Date formating could as simple as git log --format=' -- %an <%ae> %cD'
+# however, we want the tagger not the author and git log doesn't show tags, only commits ...
$(CHANGELOGS): %:
@echo "generating $@"
@mkdir -p "$(CLOGDIR)"
- @( \
- set -e; \
- version="$@"; version="$${version#$(CLOGDIR)/}"; \
- from="$${version%-*}"; version="$${version#*-}"; to="$$version"; \
- if [ "$$from" == "$$to" ]; then from=""; fi; \
- release="unstable"; \
- if [ "$$version" == "HEAD" ]; then \
- version="`git describe --tag --match='v*' | sed -e 's/-/~/' -e 's/-/./g'`"; \
- release="UNRELEASED"; \
- fi; \
- version="$${version#v}"; \
- echo "$(NAME) ($$version) $$release; urgency=low"; \
- echo; \
- git log --pretty=oneline --abbrev-commit $$from$${from:+..}$$to \
- | while read commit description; do \
- echo " * [$$commit] $$description"; \
- done; \
- git log --format='%n -- %an <%ae> %cD%n' $$to'^!'; \
+ @( \
+ version="$@"; version="$${version#$(CLOGDIR)/}"; \
+ from="$${version%-*}"; version="$${version#*-}"; to="$$version"; \
+ if [ "$$from" == "$$to" ]; then from=""; fi; \
+ release="unstable"; \
+ if [ "$$version" == "HEAD" ]; then \
+ version="`git describe --tag --match='v*' | sed -e 's/-/~/' -e 's/-/./g'`"; \
+ release="UNRELEASED"; \
+ fi; \
+ version="$${version#v}"; \
+ echo "$(NAME) ($$version) $$release; urgency=low"; \
+ echo; \
+ git log --format=' * [%h] %s' $$from$${from:+..}$$to; \
+ date="`echo $$to | git cat-file --batch \
+ | sed -n \
+ -e 's/^\(tagger\|committer\) \(.*\)00$$/\2/' \
+ -eT -e 'y/+-/-+/' -ep`"; \
+ author="$${date% * *}"; date="$${date#$$author }"; zone="$${date#* }"; \
+ date="`TZ="UTC$$zone" date -d "1/1/1970 0:0 UTC + $${date% *} seconds" --rfc-2822`"; \
+ echo; echo " -- $$author $$date"; echo; \
) >$@ || (rm -f $@; false)
.PHONY: $(word 1,$(CHANGELOGS)) # The first changelog entry must be recreated on each call
mapsectorsh: mapsector lib/00_version.sh $(wildcard lib/[0-9][0-9]_*.sh)
@echo "generating $@"
@( \
- set -e; \
sed -n -e '1p' $<; \
echo "#"; \
echo "# $@ automatically generated from"; \