This commit is contained in:
William Banfield
2021-11-16 18:16:19 -05:00
parent 1a5aef6c1b
commit 47fe96c5ac
3 changed files with 36 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/bin/env bash
set -euo pipefail
find ${OUTDIR}/proto/tendermint/ -name *.proto \
| sed "s/$OUTDIR\/\(.*\)/\1/g" \
| xargs -I {} rm {}
rm -rf ${OUTDIR}
+16
View File
@@ -0,0 +1,16 @@
#!/bin/env bash
set -euo pipefail
: ${VERS:=master}
# 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
echo ${OUTDIR}
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
: ${VERS:=master}
: ${AGAINST:='.git#branch=master'}
echo "fetching proto files"
OUTDIR=$(VERS=$VERS sh ./scripts/fetch-spec-protos.sh)
buf breaking --against $AGAINST
OUTDIR=$OUTDIR sh ./scripts/clear-spec-protos.sh