Skip to content

Commit 2b86cea

Browse files
committed
rework build-check
now it requires .SECONDEXPENSION and allows to build-check each image (with build-check-pgXX)
1 parent b4f9789 commit 2b86cea

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,17 @@ $(BUILD_TARGETS): version
306306
.PHONY: build
307307
build: $(BUILD_TARGETS) ;
308308

309+
BUILD_CHECK_TARGETS = $(patsubst %,build-check-pg%,$(PGVERSIONS))
310+
311+
.SECONDEXPANSION:
312+
.PHONY: $(BUILD_CHECK_TARGETS)
313+
$(BUILD_CHECK_TARGETS): version $$(subst build-check-,build-test-,$$@)
314+
docker run --rm \
315+
-t pg_auto_failover_test:$(subst build-check-,,$@) \
316+
pg_autoctl version --json | jq ".pg_version" | xargs echo $(subst build-check-,,$@):
317+
309318
.PHONY: build-check
310-
build-check: $(BUILD_TEST_TARGETS)
311-
for v in $(PGVERSIONS); do \
312-
docker run --rm -t pg_auto_failover_test:pg$$v pg_autoctl version --json | jq ".pg_version" | xargs echo $$v: ; \
313-
done
319+
build-check: $(BUILD_CHECK_TARGETS)
314320

315321
.PHONY: build-i386
316322
build-i386:

0 commit comments

Comments
 (0)