-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (26 loc) · 1.1 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
CONFIG_PATH=${HOME}/.proglog/
TAG ?= 0.0.10
init:
mkdir -p ${CONFIG_PATH}
gencert:
cfssl gencert -initca test/ca-csr.json | cfssljson -bare ca
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=test/ca-config.json -profile=server test/server-csr.json | cfssljson -bare server
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=test/ca-config.json -profile=client -cn="root" test/client-csr.json | cfssljson -bare root-client
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=test/ca-config.json -profile=client -cn="nobody" test/client-csr.json | cfssljson -bare nobody-client
mv *.pem *.csr ${CONFIG_PATH}
compile:
protoc api/v1/*.proto \
--go_out=. \
--go-grpc_out=. \
--go_opt=paths=source_relative \
--go-grpc_opt=paths=source_relative \
--proto_path=.
test:
cp test/model.conf ${CONFIG_PATH}
cp test/policy.csv ${CONFIG_PATH}
go test -v -race ./...
build-docker:
docker build -t davarski/proglog:$(TAG) .
load-docker:
kind load docker-image github.com/adavarski/proglog:$(TAG)
.PHONY: init gencert compile test build-docker