From 47427d6a282088f26f37ca119689be55468ebc79 Mon Sep 17 00:00:00 2001 From: Danny Grove Date: Sun, 3 Aug 2025 01:04:01 -0700 Subject: [PATCH] Extend build command to work for any image in the images folder --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ea23f14..a33fe85 100644 --- a/Makefile +++ b/Makefile @@ -140,12 +140,12 @@ config/$(ENVIRONMENT).tfbackend: $(OUT_DIGEST) infra/backend/$(ENVIRONMENT).tfst -state $(ENVIRONMENT).tfstate' \ ) -build-tools: REVISION = $(shell git rev-list -1 HEAD -- images/tools) -build-tools: SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct $(REVISON)) -build-tools: images/tools/Containerfile | out +build-%: REVISION = $(shell git rev-list -1 HEAD -- images/$*) +build-%: SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct $(REVISION)) +build-%: images/tools/Containerfile | out export SOURCE_DATE_EPOCH cd images/tools - $(call build-container,tools,$(VERSION),$<,$(SOURCE_DATE_EPOCH),$(REVISION)) + $(call build-container,$*,$(VERSION),$<,$(SOURCE_DATE_EPOCH),$(REVISION)) out/tools-image.digest: out build-tools