]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: use format tags in VERDATE and SUBVERS files
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Dec 2013 10:19:04 +0000 (11:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Dec 2013 10:22:49 +0000 (11:22 +0100)
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

Makefile
SUBVERS
VERDATE

index 4a51985b16a5fb429e3439dfe89e2861c7db82b2..01e6959fbf04c496cdecaa7760885ddee3a60666 100644 (file)
--- 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 8b137891791fe96927ad78e64b0aad7bded08bdc..26d9d35de84c8168841c0531e36b1bd60b0fc1f4 100644 (file)
--- a/SUBVERS
+++ b/SUBVERS
@@ -1 +1,2 @@
+-$Format:%h$
 
diff --git a/VERDATE b/VERDATE
index b03f7cfc1b419a7147c92532bee33bf8f6df668f..893b906606b1a6a3f0e27acaaea4462c84ecec3f 100644 (file)
--- a/VERDATE
+++ b/VERDATE
@@ -1 +1,2 @@
+$Format:%ci$
 2013/06/17