Update proto files & definitions in accordance with ADR023 (#6413)
* consolidate proto files into single directory, turn on PACKAGE_DIRECTORY_MATCH linting * add third_party root for third party proto files * move ibc proto files to top level folder, rename .proto files to types.proto as before * update protocgen script, and run code generation * move vesting proto definition to cosmos namespace, rename from types.proto in alignment with buf.build naming conventions * update Makefile so proto dependencies are set with new structure when updated * add comment for sed usage in makefile * remove unused aliases of proto generated types * add settings.json instructions to contributing.md for including protobuf paths Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network>
This commit is contained in:
co-authored by
Federico Kunze
Aaron Craelius
parent
fe9356ddb8
commit
4e73e0f817
@@ -2,11 +2,15 @@
|
||||
|
||||
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. \
|
||||
--gocosmos_out=plugins=interfacetype+grpc,paths=source_relative,\
|
||||
-I "proto" \
|
||||
-I "third_party/proto" \
|
||||
--gocosmos_out=plugins=interfacetype+grpc,\
|
||||
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
|
||||
$(find "${dir}" -maxdepth 1 -name '*.proto')
|
||||
done
|
||||
|
||||
cp -r github.com/cosmos/cosmos-sdk/* ./
|
||||
rm -rf github.com
|
||||
|
||||
Reference in New Issue
Block a user