-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (31 loc) · 1.05 KB
/
Makefile
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
35
36
37
38
# JSONNET_BIN allows to set an alternative jsonnet binary
#
# jrsonnet is orders of magnitude faster
# ... but changes how numbers are displayed:
# https://github.com/CertainLach/jrsonnet/issues/108
JSONNET_BIN ?= jrsonnet
generate:
${JSONNET_BIN} -J generator/vendor -S -c -m alertmanagerConfig/ generator/main.jsonnet
jsonnetfmt -i alertmanagerConfig/raw.libsonnet
jsonnetfmt -i alertmanagerConfig/rawRoute.libsonnet
generator/schema.json:
@cd go && go run . > ../generator/schema.json
.PHONY: docs
docs: alertmanagerKube/docs alertmanagerConfig/docs
alertmanagerKube/docs:
@cd alertmanagerKube && \
rm -rf docs/ && \
jb install && \
${JSONNET_BIN} -J vendor -S -c -m docs/ \
--exec "(import 'doc-util/main.libsonnet').render(import 'main.libsonnet')"
alertmanagerConfig/docs:
@cd alertmanagerConfig && \
rm -rf docs/ && \
jb install && \
${JSONNET_BIN} -J vendor -S -c -m docs/ \
--exec "(import 'doc-util/main.libsonnet').render(import 'main.libsonnet')"
.PHONY: test
test:
@cd test && \
jb install && \
${JSONNET_BIN} -J vendor test.jsonnet