build: fix dirty detection at the end of release build

was using Bashisms
This commit is contained in:
Christian Schwarz 2018-12-01 12:52:41 +01:00
parent 7ab51fad0d
commit 707f070a3c

View File

@ -133,8 +133,9 @@ release: $(RELEASE_BINS) $(RELEASE_NOARCH)
cd "$(ARTIFACTDIR)/release" && sha512sum $$(ls | sort) > sha512sum.txt
@# note that we use ZREPL_VERSION and not _ZREPL_VERSION because we want to detect the override
@if git describe --dirty 2>/dev/null | grep dirty >/dev/null; then \
if [ "$(ZREPL_VERSION)" == "" ]; then \
echo "[WARN] git checkout is dirty and make variable ZREPL_VERSION was not used to override"; \
echo '[INFO] either git reports checkout is dirty or git is not installed or this is not a git checkout'; \
if [ "$(ZREPL_VERSION)" = "" ]; then \
echo '[WARN] git checkout is dirty and make variable ZREPL_VERSION was not used to override'; \
exit 1; \
fi; \
fi;