From: Willy Tarreau Date: Tue, 10 Dec 2013 10:19:04 +0000 (+0100) Subject: BUILD: use format tags in VERDATE and SUBVERS files X-Git-Tag: v1.5-dev20~69 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=b5e7ef6810c6a414ddae45c029260d3780fc65b1;p=haproxy.git BUILD: use format tags in VERDATE and SUBVERS files The first line now contains a git format tag asking git-archive to place the last commit's commit date and the last commit's abbreviated ID respectively. The makefile will use these information in preference when they're available and git is not available. Now it's only necessary to add the two following lines in .git/info/attributes to have the files automatically filled by git-archive : SUBVERS export-subst VERDATE export-subst --- diff --git a/Makefile b/Makefile index 4a51985b1..01e6959fb 100644 --- a/Makefile +++ b/Makefile @@ -359,7 +359,7 @@ ifeq ($(SUBVERS),) SUBVERS := $(shell (grep -v '^\$$' SUBVERS 2>/dev/null || touch SUBVERS) | head -n 1) endif ifeq ($(VERDATE),) -VERDATE := $(shell (grep -v '^\$$' VERDATE 2>/dev/null || touch VERDATE) | head -n 1) +VERDATE := $(shell (grep -v '^\$$' VERDATE 2>/dev/null || touch VERDATE) | head -n 1 | cut -f1 -d' ' | tr '-' '/') endif #### Build options diff --git a/SUBVERS b/SUBVERS index 8b1378917..26d9d35de 100644 --- a/SUBVERS +++ b/SUBVERS @@ -1 +1,2 @@ +-$Format:%h$ diff --git a/VERDATE b/VERDATE index b03f7cfc1..893b90660 100644 --- a/VERDATE +++ b/VERDATE @@ -1 +1,2 @@ +$Format:%ci$ 2013/06/17