summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f14c72c3..56bb1c1e 100644
--- a/Makefile
+++ b/Makefile
@@ -9,12 +9,12 @@ SOURCES := $(wildcard *.go src/*.go src/*/*.go shell/*sh man/man1/*.1) $(
ifdef FZF_VERSION
VERSION := $(FZF_VERSION)
else
-VERSION := $(shell git describe --abbrev=0 2> /dev/null)
+VERSION := $(shell git describe --abbrev=0 2> /dev/null | sed "s/^v//")
endif
ifeq ($(VERSION),)
$(error Not on git repository; cannot determine $$FZF_VERSION)
endif
-VERSION_TRIM := $(shell sed "s/-.*//" <<< $(VERSION))
+VERSION_TRIM := $(shell sed "s/^v//; s/-.*//" <<< $(VERSION))
VERSION_REGEX := $(subst .,\.,$(VERSION_TRIM))
ifdef FZF_REVISION