From fb71a7e4b0bf5efccc171659dd9cf3bb1698f091 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sat, 7 Oct 2023 16:26:14 +0000 Subject: [PATCH] build: forward ZREPL_VERSION and ZREPL_PACKAGE_RELEASE to docker targets --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2c38d08..f92a504 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,9 @@ release-docker: $(ARTIFACTDIR) docker build -t zrepl_release --pull -f artifacts/release-docker.Dockerfile . docker run --rm -i -v $(CURDIR):/src -u $$(id -u):$$(id -g) \ zrepl_release \ - make release GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) + make release \ + GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) \ + ZREPL_VERSION=$(ZREPL_VERSION) ZREPL_PACKAGE_RELEASE=$(ZREPL_PACKAGE_RELEASE) debs-docker: $(MAKE) _debs_or_rpms_docker _DEB_OR_RPM=deb @@ -115,7 +117,10 @@ rpm-docker: docker build -t zrepl_rpm_pkg --pull -f packaging/rpm/Dockerfile . docker run --rm -i -v $(CURDIR):/build/src -u $$(id -u):$$(id -g) \ zrepl_rpm_pkg \ - make rpm GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) + make rpm \ + GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) \ + ZREPL_VERSION=$(ZREPL_VERSION) ZREPL_PACKAGE_RELEASE=$(ZREPL_PACKAGE_RELEASE) + deb: $(ARTIFACTDIR) # artifacts/_zrepl.zsh_completion artifacts/bash_completion docs zrepl-bin @@ -147,7 +152,9 @@ deb-docker: docker run --rm -i -v $(CURDIR):/build/src -u $$(id -u):$$(id -g) \ --ulimit nofile=1024:1024 \ zrepl_debian_pkg \ - make deb GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) + make deb \ + GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) \ + ZREPL_VERSION=$(ZREPL_VERSION) ZREPL_PACKAGE_RELEASE=$(ZREPL_PACKAGE_RELEASE) # expects `release`, `deb` & `rpm` targets to have run before NOARCH_TARBALL := $(ARTIFACTDIR)/zrepl-noarch.tar