build: optimize proto-builder (#16343)

This commit is contained in:
Julien Robert
2023-05-31 07:33:26 +00:00
committed by GitHub
parent cac7e89e1d
commit 6453234073
23 changed files with 70 additions and 37 deletions
+1 -9
View File
@@ -1,14 +1,6 @@
# this script is for generating protobuf files for the new google.golang.org/protobuf API
set -eo pipefail
protoc_install_gopulsar() {
go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
}
protoc_install_gopulsar
echo "Cleaning API directory"
(cd api; find ./ -type f \( -iname \*.pulsar.go -o -iname \*.pb.go -o -iname \*.cosmos_orm.go -o -iname \*.pb.gw.go \) -delete; find . -empty -type d -delete; cd ..)
@@ -16,7 +8,7 @@ echo "Generating API module"
(cd proto; buf generate --template buf.gen.pulsar.yaml)
echo "Generate Pulsar Test Data"
(cd testutil/testdata; buf generate --template buf.gen.pulsar.yaml)
(cd testutil/testdata; buf mod update; buf generate --template buf.gen.pulsar.yaml)
echo "Generate x/tx"
(cd x/tx; make codegen)
+2 -2
View File
@@ -23,10 +23,10 @@ done
cd ..
# generate codec/testdata proto code
(cd testutil/testdata; buf generate)
(cd testutil/testdata; buf mod update; buf generate)
# generate baseapp test messages
(cd baseapp/testutil; buf generate)
(cd baseapp/testutil; buf mod update; buf generate)
# move proto files to the right places
cp -r github.com/cosmos/cosmos-sdk/* ./