Visitar URL original
build: use 'git describe --always' to determine ZREPL_VERSION · zrepl/zrepl@bf76a1e · GitHub
Skip to content

Commit bf76a1e

Browse files
committed
build: use 'git describe --always' to determine ZREPL_VERSION
1 parent beb3be6 commit bf76a1e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ifdef ZREPL_VERSION
77
_ZREPL_VERSION := $(ZREPL_VERSION)
88
endif
99
ifndef _ZREPL_VERSION
10-
_ZREPL_VERSION := $(shell git describe --dirty 2>/dev/null || echo "ZREPL_BUILD_INVALID_VERSION" )
10+
_ZREPL_VERSION := $(shell git describe --always --dirty 2>/dev/null || echo "ZREPL_BUILD_INVALID_VERSION" )
1111
ifeq ($(_ZREPL_VERSION),ZREPL_BUILD_INVALID_VERSION) # can't use .SHELLSTATUS because Debian Stretch is still on gmake 4.1
1212
$(error cannot infer variable ZREPL_VERSION using git and variable is not overriden by make invocation)
1313
endif
@@ -83,7 +83,7 @@ release: $(RELEASE_BINS) $(RELEASE_NOARCH)
8383
cp $^ "$(ARTIFACTDIR)/release"
8484
cd "$(ARTIFACTDIR)/release" && sha512sum $$(ls | sort) > sha512sum.txt
8585
@# note that we use ZREPL_VERSION and not _ZREPL_VERSION because we want to detect the override
86-
@if git describe --dirty 2>/dev/null | grep dirty >/dev/null; then \
86+
@if git describe --always --dirty 2>/dev/null | grep dirty >/dev/null; then \
8787
echo '[INFO] either git reports checkout is dirty or git is not installed or this is not a git checkout'; \
8888
if [ "$(ZREPL_VERSION)" = "" ]; then \
8989
echo '[WARN] git checkout is dirty and make variable ZREPL_VERSION was not used to override'; \

0 commit comments

Comments
 (0)