]> git.kaiwu.me - haproxy.git/commitdiff
[BUILD] use "git cmd" instead of "git-cmd"
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jul 2009 11:43:33 +0000 (13:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Dec 2009 22:39:14 +0000 (23:39 +0100)
Newer GIT versions do not support "git-cmd" anymore, so date and version
can be wrong during development builds. Use "git cmd" now. Also fix
git-tar to use "git archive" instead of "git-tar-tree".
(cherry picked from commit 63076b3f611803a9bf9e6012193f89d14ccc32d2)

[wt: finally decided to merge it into 1.3.15.x because packaging
 backports was becoming an annoying experience].
(cherry picked from commit e68f64fd01d5c4fd561a82642f112bd5376bb8df)

Makefile

index bf268f35c68de81cf5d823b9ec44e94909c9ec1c..79dcffb4489f9a36398bd3fe2814b0309f7a485d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -255,7 +255,7 @@ endif
 # holding the same names in the current directory.
 
 ifeq ($(IGNOREGIT),)
-VERSION := $(shell [ -d .git/. ] && ref=`(git-describe --tags) 2>/dev/null` && ref=$${ref%-g*} && echo "$${ref\#v}")
+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" )
@@ -511,7 +511,7 @@ tar:        clean
        rm -f haproxy-$(VERSION)
 
 git-tar: clean
-       git-tar-tree HEAD haproxy-$(VERSION) | gzip -9 > haproxy-$(VERSION)$(SUBVERS).tar.gz
+       git archive --format=tar --prefix="haproxy-$(VERSION)/" HEAD | gzip -9 > haproxy-$(VERSION)$(SUBVERS).tar.gz
 
 version:
        @echo "VERSION: $(VERSION)"