-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
45 lines (39 loc) · 1.28 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
39
40
41
42
43
44
45
# Makefile
.PHONY: steth
steth:
docker build -t monitoring/steth -f Dockerfile .
.PHONY: gen_proto_prod
gen_proto_prod:
# generate js codes via grpc-tools
yarn grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:./dist/generated/proto \
--grpc_out=grpc_js:./dist/generated/proto \
--plugin=protoc-gen-grpc=./node_modules/.bin/grpc_tools_node_protoc_plugin \
-I ./src/brief/proto \
./src/brief/proto/*.proto
.PHONY: gen_js
gen_js:
# generate js codes via grpc-tools
yarn grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:./src/generated/proto \
--grpc_out=grpc_js:./src/generated/proto \
--plugin=protoc-gen-grpc=./node_modules/.bin/grpc_tools_node_protoc_plugin \
--proto_path=./src/brief/proto \
./src/brief/proto/*.proto
.PHONY: gen_ts
gen_ts:
# generate d.ts codes
yarn grpc_tools_node_protoc \
--plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts \
--ts_out=grpc_js:./src/generated/proto \
--proto_path=./src/brief/proto \
./src/brief/proto/*.proto
tools:
cd tools && go mod tidy && go mod vendor && go mod verify && go generate -tags tools
.PHONY: tools
.PHONY: check_alerts_syntax
check_alerts_syntax:
./bin/promtool check rules ./alerts.yml
.PHONY: test_alerts
test_alerts:
bin/promtool test rules ./alerts_tests.yml