From 311d4376839e02bbd8af47a962e1179d2ff9fcba Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Apr 2014 14:27:34 +0200 Subject: build: Make sure we get the correct previous tag for the changelog When going from an -rc release to a stable release (e.g. v0.5.8 ;-) the generated shortlog will not be generated from the latest -rc tag but from the second to last due to the sort order of the tag list: 0.5.5 0.5.6 0.5.7 v0.5.8 <-- newest tag v0.5.8-rc1 v0.5.8-rc2 v0.5.8-rc3 v0.5.8-rc4 v0.5.8-rc5 <-- second newest tag Thus use 'git describe' to get the proper previous tag. Signed-off-by: Tobias Klauser --- Cmds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Cmds') diff --git a/Cmds b/Cmds index d381a22..03ff956 100644 --- a/Cmds +++ b/Cmds @@ -40,7 +40,7 @@ GZIP = gzip --best -c GIT_ARCHIVE = git archive --prefix=netsniff-ng-$(VERSION_SHORT)/ v$(VERSION_SHORT) | \ $(1) > ../netsniff-ng-$(VERSION_SHORT).tar.$(2) GIT_TAG = git tag -a v$(VERSION_SHORT) -s -m "$(VERSION_SHORT) release" -GIT_LOG = git shortlog -n $(shell git tag | tail -n2 | head -n1)..HEAD +GIT_LOG = git shortlog -n $(shell git describe --abbrev=0 v$(VERSION_SHORT)^)..HEAD GIT_REM = git ls-files -o | xargs rm -rf GIT_PEOPLE = git log --no-merges $(shell git tag | tail -n2 | head -n1)..HEAD | grep Author: | cut -d: -f2 | \ cut -d\< -f1 | sort | uniq -c | sort -nr -- cgit v1.2.3-54-g00ecf