[Kimchi-devel] [PATCH V2] [Wok] Use always flag as a fallback
Lucio Correia
luciojhc at linux.vnet.ibm.com
Wed Dec 16 16:47:48 UTC 2015
Since new repositories don't have tags in their git
history yet, git-describe was failing. This fix uses
always flag to return the hash of latest commit as a
fallback to version number.
Signed-off-by: Lucio Correia <luciojhc at linux.vnet.ibm.com>
---
Makefile.am | 2 +-
build-aux/pkg-version | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 106a577..278bda1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,7 +158,7 @@ uninstall-local:
VERSION:
@if test -d .git; then \
- git describe --abbrev=0 > $@; \
+ git describe --abbrev=0 --always > $@; \
fi
.PHONY: deb install-deb rpm fedora-rpm suse-rpm ChangeLog VERSION
diff --git a/build-aux/pkg-version b/build-aux/pkg-version
index 749cf6c..b8b473e 100755
--- a/build-aux/pkg-version
+++ b/build-aux/pkg-version
@@ -44,7 +44,7 @@ AWK_RELEASE='
if [ ! -d .git ]; then
PKG_VERSION=`cat VERSION`
else
- PKG_VERSION=`git describe --tags --match "[0-9]*" || cat VERSION`
+ PKG_VERSION=`git describe --tags --match "[0-9]*" --always || cat VERSION`
fi
if test "x$1" = "x--full"; then
--
1.9.1
More information about the Kimchi-devel
mailing list