Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 20917e0

Browse files
committed
Build for each platform only once
Signed-off-by: Mathieu Champlon <[email protected]>
1 parent a685580 commit 20917e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ ci-test:
8282
@echo "Testing..."
8383
docker build -t $(IMAGE_NAME)-test:$(TAG) $(IMAGE_BUILD_ARGS) . --target=test
8484

85-
ci-bin-%:
86-
@echo "Building tarball for $*..."
85+
ci-bin-all:
8786
docker build -t $(IMAGE_NAME)-bin-all:$(TAG) $(IMAGE_BUILD_ARGS) . --target=bin-build
88-
docker run --rm $(IMAGE_NAME)-bin-all:$(TAG) tar -cz $(BIN_NAME)-$*$(if $(filter windows, $*),.exe,) -C /go/src/$(PKG_NAME)/_build/$(TAG)/ > $(BIN_NAME)-$*-$(TAG).tar.gz
87+
$(foreach OS, $(OS_LIST), docker run --rm $(IMAGE_NAME)-bin-all:$(TAG) tar -cz $(BIN_NAME)-$(OS)$(if $(filter windows, $(OS)),.exe,) -C /go/src/$(PKG_NAME)/_build/$(TAG)/ > $(BIN_NAME)-$(OS)-$(TAG).tar.gz || exit 1;)
8988

90-
.PHONY: bin bin-all release test check lint e2e-test unit-test clean ci-lint ci-test
89+
.PHONY: bin bin-all release test check lint e2e-test unit-test clean ci-lint ci-test ci-bin-all
9190
.DEFAULT: all

0 commit comments

Comments
 (0)