Skip to content

Commit

Permalink
Add Hugo package to Vale config to make it easy for other users to fe…
Browse files Browse the repository at this point in the history
…tch the package (#941)
  • Loading branch information
jdbaldry authored Jan 8, 2025
1 parent 56fde67 commit f092a0d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion vale/.vale.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MinAlertLevel = suggestion
Packages = Grafana
Packages = Grafana, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip

[*]
BasedOnStyles = Grafana
29 changes: 13 additions & 16 deletions vale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ help: ## Display this help
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)

Expand All @@ -32,25 +31,23 @@ 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 manifest create --amend grafana/vale:latest
podman manifest create --amend grafana/vale:$(SHORT_SHA)
podman buildx build \
--manifest grafana/vale:latest \
docker buildx build \
--platform linux/x86_64,linux/arm64 \
--progress plain \
.
podman buildx build \
--manifest grafana/vale:$(SHORT_SHA) \
--platform linux/x86_64,linux/arm64 \
--progress plain \
.
--progress=plain \
--tag grafana/vale:$(SHORT_SHA) \
--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)

grafana/vale/push:
docker buildx build \
--platform linux/x86_64,linux/arm64 \
--progress=plain \
--push \
--tag grafana/vale:$(SHORT_SHA) \
--tag grafana/vale:latest \
.
.PHONY: sync
sync: ## Update the vendored Google style.
sync:
Expand Down

0 comments on commit f092a0d

Please sign in to comment.