...

Text file src/github.com/prometheus/alertmanager/doc/alertmanager-mixin/Makefile

Documentation: github.com/prometheus/alertmanager/doc/alertmanager-mixin

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

View as plain text