[PATCH V2] [Kimchi] Use always flag as a fallback

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@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 250dc83..1c5af68 100644 --- a/Makefile.am +++ b/Makefile.am @@ -157,7 +157,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
participants (1)
-
Lucio Correia