code.gitea.io/gitea@v1.21.7/contrib/gitea-monitoring-mixin/Makefile (about) 1 JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 1 --string-style s --comment-style s 2 3 .PHONY: all 4 all: build dashboards_out 5 6 vendor: jsonnetfile.json 7 jb install 8 9 .PHONY: build 10 build: vendor 11 12 .PHONY: fmt 13 fmt: 14 find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ 15 xargs -n 1 -- $(JSONNET_FMT) -i 16 17 .PHONY: lint 18 lint: build 19 find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ 20 while read f; do \ 21 $(JSONNET_FMT) "$$f" | diff -u "$$f" -; \ 22 done 23 mixtool lint mixin.libsonnet 24 25 dashboards_out: mixin.libsonnet config.libsonnet $(wildcard dashboards/*) 26 @mkdir -p dashboards_out 27 jsonnet -J vendor -m dashboards_out lib/dashboards.jsonnet 28 29 .PHONY: clean 30 clean: 31 rm -rf dashboards_out