Skip to content

Commit

Permalink
Merge pull request #31 from paritytech/improve-polkadot-fetching
Browse files Browse the repository at this point in the history
Improve polkadot fetching for zombienet
  • Loading branch information
Moliholy authored Mar 26, 2024
2 parents 11cdef5 + e726d2a commit b8af2a0
Showing 1 changed file with 5 additions and 6 deletions.
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

0 comments on commit b8af2a0

Please sign in to comment.