forked from dymensionxyz/dymension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotocgen.sh
executable file
·34 lines (24 loc) · 860 Bytes
/
protocgen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -eo pipefail
# get protoc executions
# go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null
echo "Generating gogo proto code"
cd proto
proto_dirs=$(find ../proto -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
if grep go_package $file &>/dev/null; then
echo "Generating gogo proto code for $file"
buf generate --template buf.gen.gogo.yaml $file
fi
done
done
cd ..
# move proto files to the right places
#
# Note: Proto files are suffixed with the current binary version.
cp -r github.com/dymensionxyz/dymension/v*/* ./
rm -rf github.com
# TODO: Uncomment once ORM/Pulsar support is needed.
#
# Ref: https://github.com/osmosis-labs/osmosis/pull/1589