-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first steps * protocgen2 * more proto related changes * more proto related changes * Update docker.yml * Update docker.yml * mint folder * mint folder * add fix for proto-fix-protos.sh (#3) * does not tidy * add proto generation to makefile * remove unintended change * remove unintended change * tidy Co-authored-by: nghuyenthevinh2000 <[email protected]>
- Loading branch information
1 parent
51c0fe0
commit abc6318
Showing
14 changed files
with
223 additions
and
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: v1 | ||
plugins: | ||
- name: gocosmos | ||
out: . | ||
opt: plugins=interfacetype+grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types | ||
- name: grpc-gateway | ||
out: . | ||
opt: logtostderr=true,allow_colon_final_segments=true |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
version: v1 | ||
directories: | ||
- proto |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
version: v1 | ||
deps: | ||
- remote: buf.build | ||
owner: gogo | ||
repository: protobuf | ||
commit: 4df00b267f944190a229ce3695781e99 | ||
- remote: buf.build | ||
owner: googleapis | ||
repository: googleapis | ||
commit: cf209eca30404c41a80fec3caba9903f |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: v1 | ||
name: buf.build/CosmosContracts/juno | ||
deps: | ||
- buf.build/gogo/protobuf | ||
- buf.build/googleapis/googleapis | ||
breaking: | ||
use: | ||
- FILE | ||
lint: | ||
use: | ||
- DEFAULT | ||
- COMMENTS | ||
- FILE_LOWER_SNAKE_CASE | ||
except: | ||
- UNARY_RPC | ||
- COMMENT_FIELD | ||
- SERVICE_SUFFIX | ||
- PACKAGE_VERSION_SUFFIX | ||
- RPC_REQUEST_STANDARD_NAME |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/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 | ||
# go get github.com/regen-network/cosmos-proto/[email protected] | ||
|
||
set -eo pipefail | ||
|
||
echo "Generating gogo proto code" | ||
cd proto | ||
buf mod update | ||
cd .. | ||
buf generate | ||
|
||
# move proto files to the right places | ||
cp -r ./github.com/CosmosContracts/juno/x/* x/ | ||
rm -rf ./github.com | ||
|
||
go mod tidy -compat=1.17 | ||
|
||
# ./scripts/protocgen2.sh |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 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 ..) | ||
|
||
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) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.