-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: clone proto files from spec (#6976)
## Description clone proto files from spec in order to have them in a single location closes tendermint/spec#343
- Loading branch information
1 parent
86b292b
commit 65b93eb
Showing
3 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
# should be executed at the root directory of the project | ||
VERS=0.7.1 | ||
|
||
set -eo pipefail | ||
|
||
git clone https://github.com/celestiaorg/spec | ||
# Edit this line to clone your branch, if you are modifying protobuf files | ||
curl -qL "https://github.com/tendermint/spec/archive/refs/tags/v${VERS}.tar.gz" | tar -xjf - spec-"$VERS"/proto/ | ||
|
||
cp -r spec/proto/tendermint proto | ||
cp -r ./spec-"$VERS"/proto/tendermint/** ./proto/tendermint | ||
|
||
buf generate --path proto/tendermint | ||
|
||
mv ./proto/tendermint/abci/types.pb.go ./abci/types | ||
|
||
find proto/tendermint/ -name "*.proto" -exec rm -rf {} \; | ||
echo "proto files have been generated" | ||
|
||
echo "removing copied files" | ||
|
||
rm -rf ./proto/tendermint/abci/types.proto | ||
rm -rf ./proto/tendermint/blocksync/types.proto | ||
rm -rf ./proto/tendermint/consensus/types.proto | ||
rm -rf ./proto/tendermint/mempool/types.proto | ||
rm -rf ./proto/tendermint/p2p/types.proto | ||
rm -rf ./proto/tendermint/p2p/conn.proto | ||
rm -rf ./proto/tendermint/p2p/pex.proto | ||
rm -rf ./proto/tendermint/statesync/types.proto | ||
rm -rf ./proto/tendermint/types/block.proto | ||
rm -rf ./proto/tendermint/types/evidence.proto | ||
rm -rf ./proto/tendermint/types/params.proto | ||
rm -rf ./proto/tendermint/types/types.proto | ||
rm -rf ./proto/tendermint/types/validator.proto | ||
rm -rf ./proto/tendermint/version/version.proto | ||
|
||
rm -rf spec | ||
rm -rf ./spec-"$VERS" |