-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (27 loc) · 783 Bytes
/
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
GOPATH:=$(shell go env GOPATH)
.PHONY: proto
proto: server-proto proxy-proto
.PHONY: server-proto
server-proto:
protoc -I/usr/local/include -I. \
-I${GOPATH}/src \
-I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--go_out=plugins=grpc:. \
graderpb/grader.proto
.PHONY: proxy-proto
proxy-proto:
protoc -I/usr/local/include -I. \
-I${GOPATH}/src \
-I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--grpc-gateway_out=logtostderr=true:. \
graderpb/grader.proto
.PHONY: build
build: proto
go build -o bin/graderd cmd/graderd/main.go
go build -o bin/grader-cli cmd/grader-cli/*.go
.PHONY: test
test:
go test -v ./... -cover
.PHONY: docker
docker:
docker build . -t graderd:latest