Skip to content

Commit

Permalink
fix manual vesting warning
Browse files Browse the repository at this point in the history
  • Loading branch information
skyargos committed Jul 20, 2024
1 parent a760ee5 commit 48392e2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
13 changes: 13 additions & 0 deletions devtools/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ for dir in $proto_dirs; do
done
done

proto_dirs=$(find ./cosmos -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do
# this regex checks if a proto file has its go_package set to cosmossdk.io/api/...
# gogo proto files SHOULD ONLY be generated if this is false
# we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf
if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then
buf generate --template buf.gen.gogo.yaml $file
fi
done
done


cd ..

# move proto files to the right places
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package shentu.auth.v1alpha1;
package cosmos.auth.v1alpha1;

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
Expand Down
48 changes: 24 additions & 24 deletions x/auth/types/vesting.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48392e2

Please sign in to comment.