From 746fb4ff88b7dd2ef5f63d66562ffdad2c0d7839 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Fri, 29 Dec 2017 22:32:21 +0100 Subject: [PATCH] build: include generate step in release build + warn of dirty git working copy --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d1beb02..c53747f 100644 --- a/Makefile +++ b/Makefile @@ -72,13 +72,16 @@ docs-clean: clean \ BUILDDIR=../artifacts/docs -release-bins: $(ARTIFACTDIR) vet test +release-bins: generate $(ARTIFACTDIR) vet test @echo "INFO: In case of missing dependencies, run 'make vendordeps'" GOOS=linux GOARCH=amd64 $(GO_BUILD) -o "$(ARTIFACTDIR)/zrepl-linux-amd64" GOOS=freebsd GOARCH=amd64 $(GO_BUILD) -o "$(ARTIFACTDIR)/zrepl-freebsd-amd64" release: release-bins docs $(ARTIFACTDIR)/bash_completion - + @if echo "$(ZREPL_VERSION)" | grep dirty > /dev/null; then\ + echo '[WARN] Do not publish the artifacts, make variable ZREPL_VERSION=$(ZREPL_VERSION) indicates they are dirty!'; \ + exit 1; \ + fi clean: docs-clean rm -rf "$(ARTIFACTDIR)"