Skip to content

Commit 095d69a

Browse files
committed
add mixtool
1 parent d758fb6 commit 095d69a

File tree

6 files changed

+6475
-6507
lines changed

6 files changed

+6475
-6507
lines changed

postgres-observ-lib/Makefile

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1 @@
1-
.PHONY: build clean lint fmt test dashboards alerts vendor
2-
3-
JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 2 --string-style s --comment-style s
4-
JSONNET_LINT := jsonnet-lint -J vendor
5-
6-
all: build
7-
8-
build: vendor dashboards alerts
9-
10-
clean:
11-
rm -rf dashboards_out/* prometheus_rules_out/*
12-
13-
vendor:
14-
jb install
15-
16-
dashboards: vendor
17-
@mkdir -p dashboards_out
18-
jsonnet -J vendor -m dashboards_out -e '(import "mixin.libsonnet").grafanaDashboards'
19-
20-
alerts: vendor
21-
@mkdir -p prometheus_rules_out
22-
jsonnet -J vendor -S -e 'std.manifestYamlDoc((import "mixin.libsonnet").prometheusAlerts)' > prometheus_rules_out/prometheus_alerts.yaml
23-
24-
fmt:
25-
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
26-
xargs -n 1 -- $(JSONNET_FMT) -i
27-
28-
lint: vendor
29-
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
30-
xargs -n 1 -- $(JSONNET_LINT)
31-
32-
test: lint build
33-
@echo "Tests passed!"
1+
include ../Makefile_mixin

0 commit comments

Comments
 (0)