-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
CONFIG_PATH=${HOME}/.ring/
.PHONY: init
init:
mkdir -p ${CONFIG_PATH}
.PHONY: gencert
gencert:
cfssl gencert \
-initca cert/ca-csr.json | cfssljson -bare ca
cfssl gencert \
-ca=ca.pem \
-ca-key=ca-key.pem \
-config=cert/ca-config.json \
-profile=server \
cert/server-csr.json | cfssljson -bare server
cfssl gencert \
-ca=ca.pem \
-ca-key=ca-key.pem \
-config=cert/ca-config.json \
-profile=client \
cert/client-csr.json | cfssljson -bare client
cfssl gencert \
-ca=ca.pem \
-ca-key=ca-key.pem \
-config=cert/ca-config.json \
-profile=client \
-cn="root" \
cert/client-csr.json | cfssljson -bare root-client
cfssl gencert \
-ca=ca.pem \
-ca-key=ca-key.pem \
-config=cert/ca-config.json \
-profile=client \
-cn="nobody" \
cert/client-csr.json | cfssljson -bare nobody-client
mv *.pem *.csr ${CONFIG_PATH}
.PHONY: test
test:
go test -race -v
.PHONY: compile
compile:
protoc api/v1/*.proto \
--go_out=. \
--go-grpc_out=. \
--go_opt=paths=source_relative \
--go-grpc_opt=paths=source_relative \
--proto_path=.