mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-10 22:10:11 +00:00
wip
This commit is contained in:
@@ -9,17 +9,7 @@ set -euo pipefail
|
||||
: ${VERS:=master}
|
||||
|
||||
echo "fetching proto files"
|
||||
|
||||
# Get shortened ref of commit
|
||||
REF=$(curl -H "Accept: application/vnd.github.v3.sha" -qL \
|
||||
"https://api.github.com/repos/tendermint/spec/commits/${VERS}" \
|
||||
| cut -c -7)
|
||||
|
||||
readonly OUTDIR="tendermint-spec-${REF}"
|
||||
curl -qL "https://api.github.com/repos/tendermint/spec/tarball/${REF}" | tar -xzf - ${OUTDIR}/
|
||||
|
||||
cp -r ${OUTDIR}/proto/tendermint/* ./proto/tendermint
|
||||
cp -r ${OUTDIR}/third_party/** ./third_party
|
||||
OUTDIR=$(VERS=$VERS sh ./scripts/fetch-spec-protos.sh)
|
||||
|
||||
MODNAME="$(go list -m)"
|
||||
find ./proto/tendermint -name '*.proto' -not -path "./proto/tendermint/abci/types.proto" \
|
||||
@@ -28,7 +18,6 @@ find ./proto/tendermint -name '*.proto' -not -path "./proto/tendermint/abci/type
|
||||
# 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.
|
||||
sh ./scripts/protopackage.sh ./proto/tendermint/abci/types.proto $MODNAME "abci/types"
|
||||
|
||||
buf generate --path proto/tendermint --template ./${OUTDIR}/buf.gen.yaml --config ./${OUTDIR}/buf.yaml
|
||||
|
||||
mv ./proto/tendermint/abci/types.pb.go ./abci/types
|
||||
@@ -37,8 +26,4 @@ echo "proto files have been compiled"
|
||||
|
||||
echo "removing copied files"
|
||||
|
||||
find ${OUTDIR}/proto/tendermint/ -name *.proto \
|
||||
| sed "s/$OUTDIR\/\(.*\)/\1/g" \
|
||||
| xargs -I {} rm {}
|
||||
|
||||
rm -rf ${OUTDIR}
|
||||
OUTDIR=$OUTDIR sh ./scripts/clear-spec-protos.sh
|
||||
|
||||
Reference in New Issue
Block a user