-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into prettymuchbryce/api-server-locking
- Loading branch information
Showing
4 changed files
with
33 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
#== Requirements == | ||
# | ||
## make sure your `go env GOPATH` is in the `$PATH` | ||
## Install: | ||
## + latest buf (v1.0.0-rc11 or later) | ||
## + protobuf v3 | ||
# | ||
## All protoc dependencies must be installed not in the module scope | ||
## currently we must use grpc-gateway v1 | ||
# cd ~ | ||
# go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | ||
# go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | ||
# go install github.com/grpc-ecosystem/grpc-gateway/[email protected] | ||
# go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest | ||
# go get github.com/regen-network/cosmos-proto@latest # doesn't work in install mode | ||
# | ||
## make sure your `go env GOPATH` is in the `$PATH` | ||
## Install: | ||
## + latest buf (v1.0.0-rc11 or later) | ||
## + protobuf v3 | ||
# | ||
## All protoc dependencies must be installed not in the module scope | ||
## currently we must use grpc-gateway v1 | ||
# cd ~ | ||
# go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | ||
# go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | ||
# go install github.com/grpc-ecosystem/grpc-gateway/[email protected] | ||
# go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest | ||
# go get github.com/regen-network/cosmos-proto@latest # doesn't work in install mode | ||
# go get github.com/regen-network/cosmos-proto/[email protected] | ||
|
||
set -eo pipefail | ||
|
||
protoc_install_gocosmos() { | ||
echo "Installing protobuf gocosmos plugin" | ||
# we should use go install, but regen-network/cosmos-proto contains | ||
# replace directives. It must not contain directives that would cause | ||
# it to be interpreted differently than if it were the main module. | ||
# So the command below issues a warning and we are muting it for now. | ||
# | ||
# Installing plugins must be done outside of the module | ||
(go get github.com/regen-network/cosmos-proto/[email protected] 2> /dev/null) | ||
} | ||
|
||
protoc_install_gocosmos | ||
|
||
echo "Generating gogo proto code" | ||
cd proto | ||
proto_dirs=$(find ./cosmos -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) | ||
|