Skip to content

Commit

Permalink
chore: add misc/genprotoc/Makefile (#755)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul authored and peter7891 committed May 9, 2023
1 parent f5af511 commit 494eb72
Show file tree
Hide file tree
Showing 6 changed files with 6,625 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.gno linguist-language=Go
*.pb.go linguist-generated merge=ours -diff
go.sum linguist-generated text
1 change: 1 addition & 0 deletions misc/genproto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
proto/
11 changes: 11 additions & 0 deletions misc/genproto/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
all:
find ../.. -name pbbindings.go -delete
find ../.. -name "*.pb.go" -delete
mkdir -p proto
go run .
# exception: gen .pb.go for folders with .proto files but no package.go.
cd ../../tm2/pkg/amino/tests/proto3; \
protoc --go_out=. --go_opt=paths=source_relative \
--go_opt=Mproto/compat.proto=github.com/gnolang/gno/tm2/pkg/amino/tests/proto3 \
--go-grpc_opt=Mproto/compat.proto=github.com/gnolang/gno/tm2/pkg/amino/tests/proto3 \
--go-grpc_out=. --go-grpc_opt=paths=source_relative proto/compat.proto
2 changes: 2 additions & 0 deletions misc/genproto/genproto.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/gnolang/gno/tm2/pkg/amino"
"github.com/gnolang/gno/tm2/pkg/amino/genproto"
"github.com/gnolang/gno/tm2/pkg/amino/tests"
"github.com/gnolang/gno/tm2/pkg/commands"

// TODO: move these out.
Expand Down Expand Up @@ -62,6 +63,7 @@ func execGen(_ context.Context, _ []string) error {
bank.Package,
vm.Package,
gno.Package,
tests.Package,
}

for _, pkg := range pkgs {
Expand Down
Loading

0 comments on commit 494eb72

Please sign in to comment.