Blob Blame History Raw
From 0ae584824519995219857ca7f447e73f31a6da9a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 16 Aug 2018 10:46:57 +0200
Subject: [PATCH] travis: git pull more depth

---
 .travis.yml | 2 +-
 Makefile    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 01be428f..2df45f4d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,7 +13,7 @@ env:
 
 before_script:
   - docker pull fedora:$IMAGE
-  - git pull --tags
+  - git pull --depth=100
   - |
     git describe --abbrev=0 --tags || :
     git describe --tags || :
diff --git a/Makefile b/Makefile
index cd02dab0..80623437 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 -include dracut-version.sh
 
-VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
-GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
+VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags --always 2>/dev/null || echo $(DRACUT_VERSION))
+GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags --always 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
 
 -include Makefile.inc