forked from ga4gh/task-execution-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (37 loc) · 1.19 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
GOPATH := $(shell pwd)
export GOPATH
PATH := ${PATH}:$(shell pwd)/bin
export PATH
PROTO_INC= -I ./ -I $(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/
server:
go install tes-server
go install tes-worker
proto_build:
cd task-execution-schemas/proto && protoc $(PROTO_INC) \
--go_out=Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:../../src/tes/ga4gh/ \
--grpc-gateway_out=logtostderr=true:../../src/tes/ga4gh/ \
task_execution.proto
cd proto && protoc \
$(PROTO_INC) \
-I ../task-execution-schemas/proto/ \
--go_out=Mtask_execution.proto=tes/ga4gh,plugins=grpc:../src/tes/server/proto \
task_worker.proto
grpc:
go get -u github.com/golang/protobuf/protoc-gen-go
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
depends: grpc
go get -d tes-server/
go get -d tes-worker/
golint:
go get -v github.com/golang/lint/golint/
tidy: golint
@for f in $$(find $(GOPATH)/src/tes* -name '*.go'); \
do \
gofmt -w $$f; \
golint $$f; \
done
@for d in $(GOPATH)/src/tes*; \
do \
go tool vet $$d; \
done