Files
tendermint/scripts/protocgen.sh
Marko 73e22a3c5a abci: proto files follow same path (#5039)
## Description

have the defined abci proto types follow the same directory structure as in abci folder.

Closes: #XXX
2020-06-23 05:38:50 +00:00

23 lines
642 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
protoc \
-I "proto" \
-I "third_party/proto" \
--gogofaster_out=\
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,\
plugins=grpc,paths=source_relative:. \
$(find "${dir}" -maxdepth 1 -name '*.proto')
done
cp -r ./tendermint/* ./proto/*
rm -rf tendermint
mv ./proto/tendermint/abci/types/types.pb.go ./abci/types
mv ./proto/tendermint/rpc/grpc/types.pb.go ./rpc/grpc