Extend build command to work for any image in the images folder

This commit is contained in:
Danny Grove 2025-08-03 01:04:01 -07:00
parent 51cd8ae0ca
commit 47427d6a28
Signed by: danny
GPG Key ID: E1F4160251DB4C2E
1 changed files with 4 additions and 4 deletions

View File

@ -140,12 +140,12 @@ config/$(ENVIRONMENT).tfbackend: $(OUT_DIGEST) infra/backend/$(ENVIRONMENT).tfst
-state $(ENVIRONMENT).tfstate' \ -state $(ENVIRONMENT).tfstate' \
) )
build-tools: REVISION = $(shell git rev-list -1 HEAD -- images/tools) build-%: REVISION = $(shell git rev-list -1 HEAD -- images/$*)
build-tools: SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct $(REVISON)) build-%: SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct $(REVISION))
build-tools: images/tools/Containerfile | out build-%: images/tools/Containerfile | out
export SOURCE_DATE_EPOCH export SOURCE_DATE_EPOCH
cd images/tools 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 out/tools-image.digest: out build-tools