-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (40 loc) · 1.35 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
.PHONY: clean-proto protoc
clean-proto:
rm -rf grpc/gen/*.pb.go
rm -rf _jsapp/src/grpc/*.ts
protoc:
protoc \
--proto_path=grpc/_protobuf \
--proto_path=./vendor \
--gogo_out=\
Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\
plugins=grpc:./grpc/gen \
grpc/_protobuf/*.proto
tsprotoc:
protoc \
--plugin=protoc-gen-ts=./_jsapp/node_modules/.bin/protoc-gen-ts \
--js_out=import_style=commonjs,binary:_jsapp/src/grpc \
--ts_out=service=true:_jsapp/src/grpc \
-I grpc/_protobuf/ \
--proto_path=grpc/_protobuf \
--proto_path=./vendor \
grpc/_protobuf/*.proto
cprotoc: clean-proto protoc tsprotoc
doc:
protoc \
--doc_out=markdown:grpc/doc \
--proto_path=grpc/_protobuf \
./$${dir}/*.proto && cd - ; \
install-dev-deps:
go get -u github.com/golang/dep/cmd/dep
go get -u google.golang.org/grpc
go get -u github.com/golang/protobuf/proto
go get -u github.com/gogo/protobuf/jsonpb
go get -u github.com/gogo/protobuf/protoc-gen-gogo
go get -u github.com/gogo/protobuf/gogoproto
go get -u github.com/gogo/protobuf/proto/...
go get -u github.com/jteeuwen/go-bindata/...