diff --git a/vale/Makefile b/vale/Makefile index 5bd8bd0a5..d78f9112b 100644 --- a/vale/Makefile +++ b/vale/Makefile @@ -12,6 +12,7 @@ help: @awk 'BEGIN {FS = ": ##"; printf "Usage:\n make \n\nTargets:\n"} /^[a-zA-Z0-9_\.\-\/% ]+: ##/ { printf " %-45s %s\n", $$1, $$2 }' $(MAKEFILE_LIST) PODMAN := $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi) +SHORT_SHA := $(shell git rev-parse --short HEAD) GIT_ROOT := $(shell git rev-parse --show-toplevel) DICTIONARIES := Grafana/styles/config/dictionaries/en_US-grafana.dic @@ -31,24 +32,25 @@ Grafana/styles/config/dictionaries/en_US-grafana.%: dictionary.libsonnet .PHONY: grafana/vale grafana/vale: ## Builds a container image for Vale with the Grafana style loaded. grafana/vale: Grafana/styles/config/dictionaries/en_US-grafana.aff Grafana/styles/config/dictionaries/en_US-grafana.dic Grafana/styles/Grafana/Google .vale.ini - $(PODMAN) build \ + podman manifest create --amend grafana/vale:latest + podman manifest create --amend grafana/vale:$(SHORT_SHA) + podman buildx build \ + --manifest grafana/vale:latest \ --platform linux/x86_64,linux/arm64 \ --progress plain \ - --tag grafana/vale:$(shell git rev-parse --short HEAD) \ - --tag grafana/vale:latest \ . - -.PHONY: grafana/vale/push -grafana/vale/push: ## Builds and pushes container image for Vale with the Grafana style loaded. -grafana/vale/push: dictionaries/en_US-grafana.aff dictionaries/en_US-grafana.dic Grafana/styles/Grafana/Google .vale.ini - $(PODMAN) build \ + podman buildx build \ + --manifest grafana/vale:$(SHORT_SHA) \ --platform linux/x86_64,linux/arm64 \ --progress plain \ - --push \ - --tag grafana/vale:$(shell git rev-parse --short HEAD) \ - --tag grafana/vale:latest \ . +.PHONY: grafana/vale/push +grafana/vale/push: ## Builds and pushes container image for Vale with the Grafana style loaded. +grafana/vale/push: grafana/vale + podman manifest push localhost/grafana/vale:latest docker://docker.io/grafana/vale:latest + podman manifest push localhost/grafana/vale:$(SHORT_SHA) docker://docker.io/grafana/vale:$(SHORT_SHA) + .PHONY: sync sync: ## Update the vendored Google style. sync: