summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 894a9fa..278ff82 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ CONF_FILES := mkinitfs.conf \
SCRIPTS := $(SBIN_FILES) initramfs-init
IN_FILES := $(addsuffix .in,$(SCRIPTS))
-GIT_REV := $(shell git describe || echo exported)
+GIT_REV := $(shell test -d .git && git describe || echo exported)
ifneq ($(GIT_REV), exported)
FULL_VERSION := $(patsubst $(PACKAGE)-%,%,$(GIT_REV))
FULL_VERSION := $(patsubst v%,%,$(FULL_VERSION))