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