protocgen script cleanup

This commit is contained in:
William Banfield
2021-11-12 12:52:10 -05:00
parent 0282a88252
commit 07ffb7c0d0

View File

@@ -24,7 +24,8 @@ cp -r ./tendermint-spec-"$REF"/proto/tendermint/* ./proto/tendermint
cp -r ./tendermint-spec-"$REF"/third_party/** ./third_party
MODNAME="$(go list -m)"
find ./proto/tendermint -name *.proto -not -path "./proto/tendermint/abci/types.proto" -exec sh ./scripts/protopackage.sh {} $MODNAME ';'
find ./proto/tendermint -name '*.proto' -not -path "./proto/tendermint/abci/types.proto" \
-exec sh ./scripts/protopackage.sh {} "$MODNAME" ';'
# For historical compatibility, the abci file needs to get a slightly different import name
# so that it can be moved into the ./abci/types directory.
@@ -38,5 +39,8 @@ echo "proto files have been compiled"
echo "removing copied files"
find ./tendermint-spec-"$REF"/proto/tendermint/ -name *.proto | sed "s/\.\/tendermint-spec-$REF\/\(.*\)/\1/g" | xargs -I {} rm {}
find ./tendermint-spec-"$REF"/proto/tendermint/ -name *.proto \
| sed "s/\.\/tendermint-spec-$REF\/\(.*\)/\1/g" \
| xargs -I {} rm {}
rm -rf ./tendermint-spec-"$REF"