forked from cerc-io/laconicd-deprecated
conflicts
This commit is contained in:
+15
-6
@@ -4,22 +4,26 @@ set -eo pipefail
|
||||
|
||||
protoc_gen_gocosmos() {
|
||||
if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then
|
||||
echo -e "\tPlease run this command from somewhere inside the ethermint folder."
|
||||
echo -e "\tPlease run this command from somewhere inside the sommelier folder."
|
||||
return 1
|
||||
fi
|
||||
|
||||
go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null
|
||||
}
|
||||
|
||||
protoc_gen_doc() {
|
||||
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc 2>/dev/null
|
||||
}
|
||||
|
||||
protoc_gen_gocosmos
|
||||
protoc_gen_doc
|
||||
|
||||
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
|
||||
for dir in $proto_dirs; do
|
||||
buf protoc \
|
||||
-I "proto" \
|
||||
-I "third_party/proto" \
|
||||
--gocosmos_out=plugins=interfacetype+grpc,\
|
||||
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
|
||||
--gocosmos_out=plugins=interfacetype+grpc:. \
|
||||
$(find "${dir}" -maxdepth 1 -name '*.proto')
|
||||
|
||||
# command to generate gRPC gateway (*.pb.gw.go in respective modules) files
|
||||
@@ -31,9 +35,14 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
|
||||
|
||||
done
|
||||
|
||||
# generate codec/testdata proto code
|
||||
buf protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\
|
||||
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/*.proto
|
||||
# command to generate docs using protoc-gen-doc
|
||||
buf protoc \
|
||||
-I "proto" \
|
||||
-I "third_party/proto" \
|
||||
--doc_out=./docs/core \
|
||||
--doc_opt=./docs/protodoc-markdown.tmpl,proto-docs.md \
|
||||
$(find "$(pwd)/proto" -maxdepth 5 -name '*.proto')
|
||||
go mod tidy
|
||||
|
||||
# move proto files to the right places
|
||||
cp -r github.com/cosmos/ethermint/* ./
|
||||
|
||||
Reference in New Issue
Block a user