Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve polkadot fetching for zombienet #31

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions zombienet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ fi

BIN_DIR=bin

build_polkadot(){
build_polkadot() {
echo "cloning polkadot repository..."
CWD=$(pwd)
mkdir -p "$BIN_DIR"
pushd /tmp
git clone https://github.com/paritytech/polkadot-sdk.git
git clone --depth 1 --branch "release-polkadot-$POLKADOT_V" https://github.com/paritytech/polkadot-sdk.git
pushd polkadot-sdk
git checkout release-polkadot-$POLKADOT_V
echo "building polkadot executable..."
cargo build --release --features fast-runtime
cp target/release/polkadot "$CWD/$BIN_DIR"
Expand All @@ -40,7 +39,7 @@ build_polkadot(){
popd
}

build_chainspec_generator(){
build_chainspec_generator() {
echo "cloning chain-spec-generator..."
CWD=$(pwd)
mkdir -p "$BIN_DIR"
Expand All @@ -54,7 +53,7 @@ build_chainspec_generator(){
popd
}

fetch_polkadot(){
fetch_polkadot() {
echo "fetching from polkadot repository..."
echo $BIN_DIR
mkdir -p "$BIN_DIR"
Expand All @@ -72,7 +71,7 @@ zombienet_init() {
curl -LO https://github.com/paritytech/zombienet/releases/download/$ZOMBIENET_V/$ZOMBIENET_BIN
chmod +x $ZOMBIENET_BIN
fi
if [ ! -f $BIN_DIR/chain-spec-generator ]; then
if [ ! -f $BIN_DIR/chain-spec-generator ]; then
build_chainspec_generator
fi
if [ ! -f $BIN_DIR/polkadot ]; then
Expand Down
Loading