-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 1.12 KB
/
Makefile
File metadata and controls
34 lines (27 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 2 --string-style s --comment-style s
DOCKER_ARCHS ?= amd64 armv7 arm64
DOCKER_IMAGE_NAME ?= snowflake-exporter
ALL_SRC := $(shell find . -name '*.go' -o -name 'Dockerfile*' -type f | sort)
all:: vet common-all
include Makefile.common
# Check if .github/workflows/*.yml need to be updated
# when changing the install-ci-deps target.
install-ci-deps:
go install github.com/google/go-jsonnet/cmd/jsonnet@v0.20.0
go install github.com/google/go-jsonnet/cmd/jsonnetfmt@v0.20.0
go install github.com/google/go-jsonnet/cmd/jsonnet-lint@v0.20.0
go install github.com/monitoring-mixins/mixtool/cmd/mixtool@main
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.5.1
go install github.com/grafana/grizzly/cmd/grr@latest
fmt:
@find . -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
xargs -n 1 -- $(JSONNET_FMT) -i
lint-fmt:
@RESULT=0; \
for f in $$(find . -type f \( -name '*.libsonnet' -o -name '*.jsonnet' \) -not -path '*/vendor/*'); do \
$(JSONNET_FMT) -- "$$f" | diff -u "$$f" -; \
if [ $$? -ne 0 ]; then \
RESULT=1; \
fi; \
done; \
exit $$RESULT