* Docker container based Protobuf generation and linting * Add protobuf comments * Update contrib/prototools-docker/Dockerfile Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Update contrib/prototools-docker/Dockerfile Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Update x/wasm/internal/types/msg.proto Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Update x/wasm/internal/types/types.proto Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
20 lines
844 B
Bash
Executable File
20 lines
844 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eo pipefail
|
|
|
|
PROJECT_PROTO_DIR=x/wasm/internal/types/
|
|
COSMOS_SDK_DIR=${COSMOS_SDK_DIR:-$(go list -f "{{ .Dir }}" -m github.com/cosmos/cosmos-sdk)}
|
|
|
|
# Generate Go types from protobuf
|
|
protoc \
|
|
-I=. \
|
|
-I="$COSMOS_SDK_DIR/third_party/proto" \
|
|
-I="$COSMOS_SDK_DIR/proto" \
|
|
--gocosmos_out=Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=interfacetype+grpc,paths=source_relative:. \
|
|
--grpc-gateway_out .\
|
|
--grpc-gateway_opt logtostderr=true \
|
|
--grpc-gateway_opt paths=Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,paths=source_relative \
|
|
--doc_out=./doc \
|
|
--doc_opt=markdown,proto.md \
|
|
$(find "${PROJECT_PROTO_DIR}" -maxdepth 1 -name '*.proto')
|