Skip to content

Commit

Permalink
fixing double curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
catmcgee committed Feb 13, 2024
1 parent 4055122 commit c8d61da
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/scripts/update_aztec_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,17 @@ for base_dir in "${base_dirs[@]}"; do
# Extract relative path
relative_path=$(echo $line | grep -oP '(?<=path = ").+?(?=")')


if [[ $relative_path == ../../../aztec-nr/* ]]; then
new_path="{ git=\"https://github.com/AztecProtocol/aztec-packages/\", tag=\"$version_tag\", directory=\"yarn-project/aztec-nr/aztec\" }"
new_path="git=\"https://github.com/AztecProtocol/aztec-packages/\", tag=\"$version_tag\", directory=\"yarn-project/aztec-nr/aztec\""
elif [[ $relative_path == ../* ]]; then
dir_name=$(basename "$relative_path")
new_path="{ git=\"https://github.com/AztecProtocol/aztec-packages/\", tag=\"$version_tag\", directory=\"noir-projects/noir-contracts/contracts/$dir_name\" }"
new_path="git=\"https://github.com/AztecProtocol/aztec-packages/\", tag=\"$version_tag\", directory=\"noir-projects/noir-contracts/contracts/$dir_name\""
fi

# Replace path with new path
sed -i "s|path = \".*\"|$new_path|" "$nargo_file_path"
sed -i "s|path = \".*\"|aztec = { $new_path }|" "$nargo_file_path"

echo "Updated path for Nargo.toml dependency"
fi
done < "$nargo_file_path"
Expand Down

0 comments on commit c8d61da

Please sign in to comment.