forked from tendermint/tendermint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabci-gen.sh
executable file
·31 lines (21 loc) · 1.08 KB
/
abci-gen.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
#!/usr/bin/env bash
# This file was added during development of ABCI++. This file is a script to allow
# the intermediate proto files to be built while active development proceeds
# on ABCI++.
# This file should be removed when work on ABCI++ is complete.
# For more information, see https://github.com/tendermint/tendermint/issues/8066.
set -euo pipefail
cp ./proto/tendermint/abci/types.proto.intermediate ./proto/tendermint/abci/types.proto
cp ./proto/tendermint/types/types.proto.intermediate ./proto/tendermint/types/types.proto
MODNAME="$(go list -m)"
find ./proto/tendermint -name '*.proto' -not -path "./proto/tendermint/abci/types.proto" \
-exec sh ./scripts/protopackage.sh {} "$MODNAME" ';'
sh ./scripts/protopackage.sh ./proto/tendermint/abci/types.proto $MODNAME "abci/types"
make proto-gen
mv ./proto/tendermint/abci/types.pb.go ./abci/types
echo "proto files have been compiled"
echo "checking out copied files"
find proto/tendermint/ -name '*.proto' -not -path "*.intermediate"\
| xargs -I {} git checkout {}
find proto/tendermint/ -name '*.pb.go' \
| xargs -I {} git checkout {}