From 07f001c87c6934cd46f6b65237282c512de1f290 Mon Sep 17 00:00:00 2001 From: Conner Swann <2635475+yourbuddyconner@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:42:14 -0700 Subject: [PATCH] fix for branch names with / in it --- update_sp1_and_build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update_sp1_and_build.sh b/update_sp1_and_build.sh index b52c9b4..569cd4e 100755 --- a/update_sp1_and_build.sh +++ b/update_sp1_and_build.sh @@ -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