Skip to content

Commit 7b04142

Browse files
committed
feat: update to download pre-release
1 parent 61ebb4b commit 7b04142

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

script/src/bin/cli/fork.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ use derive_more::Display;
33

44
#[derive(Debug, Clone, Parser)]
55
pub struct ForkArgs {
6-
#[clap(long, short, default_value_t = Fork::Deneb)]
6+
#[clap(long, short, default_value_t = Fork::Electra)]
77
pub fork: Fork,
88
}
99

1010
#[derive(ValueEnum, Debug, Clone, Default, Display)]
1111
#[clap(rename_all = "lowercase")]
1212
pub enum Fork {
13-
#[default]
1413
#[display("deneb")]
1514
Deneb,
1615

16+
#[default]
1717
#[display("electra")]
1818
Electra,
1919
}

script/subscripts/download_ef_data.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ TARGET="mainnet.tar.gz"
44
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55
PARENT_DIR="$(dirname "$SCRIPT_DIR")"
66
EXTRACT_DIR="$PARENT_DIR/mainnet"
7-
LATEST_RELEASE_URL="https://api.github.com/repos/ethereum/consensus-spec-tests/releases/latest"
7+
RELEASE_URL="https://api.github.com/repos/ethereum/consensus-spec-tests/releases"
88

99
download_and_extract() {
1010
if [ -d "$EXTRACT_DIR" ]; then
1111
echo "$EXTRACT_DIR already exists. Skipping extraction."
1212
return 0
1313
fi
1414

15-
echo "Fetching the latest release URL for $TARGET..."
16-
DOWNLOAD_URL=$(curl -s "$LATEST_RELEASE_URL" | jq -r ".assets[] | select(.name == \"$TARGET\") | .browser_download_url")
15+
echo "Fetching the latest release URL (including pre-releases) for $TARGET..."
16+
DOWNLOAD_URL=$(curl -s "$RELEASE_URL" | jq -r ".[0].assets[] | select(.name == \"$TARGET\") | .browser_download_url")
1717

1818
if [ -z "$DOWNLOAD_URL" ] || [ "$DOWNLOAD_URL" == "null" ]; then
1919
echo "Failed to fetch download URL for $TARGET."

0 commit comments

Comments
 (0)