Skip to content

Commit

Permalink
Fix podman builds
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Baldry <[email protected]>
  • Loading branch information
jdbaldry committed Dec 6, 2024
1 parent b147f83 commit 07381b8
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions vale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ help:
@awk 'BEGIN {FS = ": ##"; printf "Usage:\n make <target>\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
Expand All @@ -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:
Expand Down

0 comments on commit 07381b8

Please sign in to comment.