Skip to content

Commit 74594a4

Browse files
authored
fix: download sp1 files from latest release instead of main (#695)
1 parent b8cda0b commit 74594a4

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

batcher/aligned/get_proof_test_files.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#!/bin/bash
22

3-
SP1_ELF_URL="https://raw.githubusercontent.com/yetanotherco/aligned_layer/main/scripts/test_files/sp1/sp1_fibonacci.elf"
4-
SP1_PROOF_URL="https://raw.githubusercontent.com/yetanotherco/aligned_layer/main/scripts/test_files/sp1/sp1_fibonacci.proof"
3+
CURRENT_TAG=$(curl -s -L \
4+
-H "Accept: application/vnd.github+json" \
5+
-H "X-GitHub-Api-Version: 2022-11-28" \
6+
https://api.github.com/repos/yetanotherco/aligned_layer/releases/latest \
7+
| grep '"tag_name":' | awk -F'"' '{print $4}')
8+
9+
SP1_ELF_URL="https://raw.githubusercontent.com/yetanotherco/aligned_layer/$CURRENT_TAG/scripts/test_files/sp1/sp1_fibonacci.elf"
10+
SP1_PROOF_URL="https://raw.githubusercontent.com/yetanotherco/aligned_layer/$CURRENT_TAG/scripts/test_files/sp1/sp1_fibonacci.proof"
511

612
SP1_ELF_NAME="sp1_fibonacci.elf"
713
SP1_PROOF_NAME="sp1_fibonacci.proof"
@@ -12,7 +18,7 @@ ALIGNED_TEST_FILES_DIR="$ALIGNED_DIR/test_files"
1218

1319
mkdir -p "$ALIGNED_TEST_FILES_DIR"
1420

15-
echo "Downloading SP1 ELF file..."
21+
echo "Downloading SP1 ELF file from $CURRENT_TAG release"
1622

1723
if curl -sSf -L "$SP1_ELF_URL" -o "$ALIGNED_TEST_FILES_DIR/$SP1_ELF_NAME"; then
1824
echo "SP1 ELF download successful"

batcher/aligned/install_aligned.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fi
2828

2929
mkdir -p "$ALIGNED_BIN_DIR"
3030
if curl -sSf -L "$RELEASE_URL$FILE" -o "$ALIGNED_BIN_PATH"; then
31-
echo "Aligned download successful, installing..."
31+
echo "Aligned download successful, installing $CURRENT_TAG release..."
3232
else
3333
echo "Error: Failed to download $RELEASE_URL$FILE"
3434
exit 1
@@ -69,6 +69,6 @@ if [[ ":$PATH:" != *":${ALIGNED_BIN_DIR}:"* ]]; then
6969
fi
7070
fi
7171

72-
echo "Aligned installed successfully in $ALIGNED_BIN_PATH."
72+
echo "Aligned $CURRENT_TAG installed successfully in $ALIGNED_BIN_PATH."
7373
echo "Detected your preferred shell is $PREF_SHELL and added aligned to PATH."
7474
echo "Run 'source $PROFILE' or start a new terminal session to use aligned."

0 commit comments

Comments
 (0)