mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-12 08:23:58 +02:00
4d177a782e
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
16 lines
656 B
Bash
Executable File
16 lines
656 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
find . -type f -name '*.pb.*.go' -o -name '*.pb.go' -a ! -name 'message.pb.go' -delete
|
|
PROTOS=$(find . -type f -name '*.proto' | grep -v proto/google/api)
|
|
|
|
mkdir -p proto/google/api
|
|
curl -s -o proto/google/api/annotations.proto -L https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/annotations.proto
|
|
curl -s -o proto/google/api/http.proto -L https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/http.proto
|
|
|
|
for PROTO in $PROTOS; do
|
|
echo $PROTO
|
|
protoc -I./proto -I. -I$(dirname $PROTO) --go_out=plugins=grpc,paths=source_relative:. --micro_out=paths=source_relative:. $PROTO
|
|
done
|
|
|
|
rm -r proto
|