You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 763B

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