Skip to content

Commit

Permalink
fix for branch names with / in it
Browse files Browse the repository at this point in the history
  • Loading branch information
yourbuddyconner committed Sep 20, 2024
1 parent b58c11a commit 07f001c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions update_sp1_and_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ SP1_DEPS=("sp1-prover" "sp1-core-executor" "sp1-core-machine" "sp1-cuda" "sp1-st
if [[ $SP1_REF =~ ^[0-9a-f]{7,40}$ ]]; then
# It's a commit hash
for dep in "${SP1_DEPS[@]}"; do
sed -i.bak -E 's/^('"$dep"' = \{ git = "https:\/\/github\.com\/succinctlabs\/sp1.*)(branch = "[^"]+"|rev = "[^"]+")/\1rev = "'"$SP1_REF"'"/' "$CARGO_TOML"
sed -i.bak "s#^$dep = { git = \"https://github.com/succinctlabs/sp1.*\(branch = \"[^\"]+\"|rev = \"[^\"]+\"\)#$dep = { git = \"https://github.com/succinctlabs/sp1\", rev = \"$SP1_REF\"#" "$CARGO_TOML"
done
echo "Updated Cargo.toml with new SP1 commit hash"
else
# It's a branch name
for dep in "${SP1_DEPS[@]}"; do
sed -i.bak -E 's/^('"$dep"' = \{ git = "https:\/\/github\.com\/succinctlabs\/sp1.*)(branch = "[^"]+"|rev = "[^"]+")/\1branch = "'"$SP1_REF"'"/' "$CARGO_TOML"
sed -i.bak "s#^$dep = { git = \"https://github.com/succinctlabs/sp1.*\(branch = \"[^\"]+\"|rev = \"[^\"]+\"\)#$dep = { git = \"https://github.com/succinctlabs/sp1\", branch = \"$SP1_REF\"#" "$CARGO_TOML"
done
echo "Updated Cargo.toml with new SP1 branch"
fi
Expand Down

0 comments on commit 07f001c

Please sign in to comment.