File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -eo pipefail
4
+
5
+ proto_dirs=$( find ./proto -path -prune -o -name ' *.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
6
+ for dir in $proto_dirs ; do
7
+ protoc \
8
+ -I " proto" \
9
+ -I " third_party/proto" \
10
+ --gocosmos_out=plugins=interfacetype+grpc,\
11
+ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
12
+ $( find " ${dir} " -maxdepth 1 -name ' *.proto' )
13
+
14
+ # command to generate gRPC gateway (*.pb.gw.go in respective modules) files
15
+ protoc \
16
+ -I " proto" \
17
+ -I " third_party/proto" \
18
+ --grpc-gateway_out=logtostderr=true:. \
19
+ $( find " ${dir} " -maxdepth 1 -name ' *.proto' )
20
+
21
+ done
22
+
23
+ # move proto files to the right places
24
+ cp -r github.com/OmniFlix/onft/types/* ./types
25
+ rm -rf github.com
26
+
You can’t perform that action at this time.
0 commit comments