mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-24 13:42:16 +00:00
[BUILD] report commit date and not author's date as build date
By default, when building from a git tree, haproxy's release date is set to the last commit's date. But it was the wrong date which was used, the initial patch's date, which can cause time jumps in the past when an old patch gets merged. What we want is the commit date, which reflects the correct code history.
This commit is contained in:
parent
3a058f3091
commit
446024e7fb
4
Makefile
4
Makefile
@ -268,8 +268,8 @@ ifeq ($(IGNOREGIT),)
|
||||
VERSION := $(shell [ -d .git/. ] && ref=`(git-describe --tags) 2>/dev/null` && ref=$${ref%-g*} && echo "$${ref\#v}")
|
||||
ifneq ($(VERSION),)
|
||||
# OK git is there and works.
|
||||
SUBVERS := $(shell comms=`git-log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit `; [ $$comms -gt 0 ] && echo "-$$comms" )
|
||||
VERDATE := $(shell date +%Y/%m/%d -d "`git-log HEAD^.. 2>/dev/null | sed -ne '/^Date:/{s/\(^[^ ]*:\)\|\( [-+].*\)//gp;q}'`" )
|
||||
SUBVERS := $(shell comms=`git log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit `; [ $$comms -gt 0 ] && echo "-$$comms" )
|
||||
VERDATE := $(shell date +%Y/%m/%d -d "`git log --pretty=fuller HEAD^.. 2>/dev/null | sed -ne '/^CommitDate:/{s/\(^[^ ]*:\)\|\( [-+].*\)//gp;q}'`" )
|
||||
endif
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user