mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
proto: move all proto dirs to /proto (#5012)
## Description This PR moves all proto files under one dir (`/proto`). The script to generate adding functionality to copy the files that still need to be in the same place. (abci & rpc) renames every proto package from `tendermint.proto.<pkg_name>` to `tendermint.<pkg_name>` Removes unneeded types in privval proto directory Closes: #XXX
This commit is contained in:
@@ -2,10 +2,19 @@
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
proto_dirs=$(find . -path ./third_party -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
|
||||
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
|
||||
for dir in $proto_dirs; do
|
||||
protoc \
|
||||
-I. \
|
||||
--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:. \
|
||||
--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 proto/abci/types.pb.go ./abci/types
|
||||
rm -rf proto/abci/types.pb.go
|
||||
|
||||
cp -r proto/rpc/types.pb.go ./rpc/grpc
|
||||
rm -rf proto/rpc/types.pb.go
|
||||
|
||||
Reference in New Issue
Block a user