Skip to content

Commit

Permalink
fix: download sp1 files from latest release instead of main (#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuArce authored Jul 31, 2024
1 parent b8cda0b commit 74594a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions batcher/aligned/get_proof_test_files.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

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

SP1_ELF_URL="https://raw.githubusercontent.com/yetanotherco/aligned_layer/$CURRENT_TAG/scripts/test_files/sp1/sp1_fibonacci.elf"
SP1_PROOF_URL="https://raw.githubusercontent.com/yetanotherco/aligned_layer/$CURRENT_TAG/scripts/test_files/sp1/sp1_fibonacci.proof"

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

mkdir -p "$ALIGNED_TEST_FILES_DIR"

echo "Downloading SP1 ELF file..."
echo "Downloading SP1 ELF file from $CURRENT_TAG release"

if curl -sSf -L "$SP1_ELF_URL" -o "$ALIGNED_TEST_FILES_DIR/$SP1_ELF_NAME"; then
echo "SP1 ELF download successful"
Expand Down
4 changes: 2 additions & 2 deletions batcher/aligned/install_aligned.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi

mkdir -p "$ALIGNED_BIN_DIR"
if curl -sSf -L "$RELEASE_URL$FILE" -o "$ALIGNED_BIN_PATH"; then
echo "Aligned download successful, installing..."
echo "Aligned download successful, installing $CURRENT_TAG release..."
else
echo "Error: Failed to download $RELEASE_URL$FILE"
exit 1
Expand Down Expand Up @@ -69,6 +69,6 @@ if [[ ":$PATH:" != *":${ALIGNED_BIN_DIR}:"* ]]; then
fi
fi

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

0 comments on commit 74594a4

Please sign in to comment.