2019-03-06 20:13:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2019-03-12 22:34:45 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
# Generate the gRPC bindings for all proto files.
|
|
|
|
for file in ./*.proto
|
|
|
|
do
|
|
|
|
protoc -I/usr/local/include -I. \
|
|
|
|
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
|
|
|
|
--go_out=plugins=grpc,paths=source_relative:. \
|
|
|
|
${file}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
# Only generate the REST proxy and definitions for the client component.
|
|
|
|
protoc -I/usr/local/include -I. \
|
|
|
|
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
|
|
|
|
--grpc-gateway_out=logtostderr=true:. \
|
|
|
|
client.proto
|
2019-03-06 23:38:36 +00:00
|
|
|
|
|
|
|
protoc -I/usr/local/include -I. \
|
2019-03-12 22:34:45 +00:00
|
|
|
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
|
|
|
|
--swagger_out=logtostderr=true:. \
|
2019-03-06 23:38:36 +00:00
|
|
|
client.proto
|