Skip to content

Commit

Permalink
fix: map relative path to protocol circuits
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Dec 14, 2023
1 parent a130c0c commit b9ccf16
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/mirror_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Mirror Repositories
on:
schedule:
# Run the workflow every night at 2:00 AM UTC.
- cron: '0 2 * * *'
- cron: "0 2 * * *"

jobs:
mirror-to-build-system-repo:
Expand Down Expand Up @@ -72,9 +72,29 @@ jobs:
git config --global user.name AztecBot
git config --global user.email tech@aztecprotocol.com
monorepo_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
# list all aztec-packages tags, take the "highest" version
monorepo_tag="$(git tag --list aztec-packages-v* | sort --version-sort | tail -1)"
monorepo_protocol_circuits_path="yarn-project/noir-protocol-circuits"
nargo_file="$SUBREPO_PATH/aztec/Nargo.toml"
# match lines like this:
# protocol_types = { path = "../../noir-protocol-circuits/src/crates/types" }
# and replace with
# protocol_types = { git="https://github.com/aztecprotocol/aztec-packages", tag="aztec-packages-v0.16.9", directory="yarn-project/noir-protocol-circuits/src/crates/types" }
sed --regexp-extended --in-place \
"s;path\s*=\s*\".*noir-protocol-circuits(.*)\";git=\"$monorepo_url\", tag=\"$monorepo_tag\", directory=\"$monorepo_protocol_circuits_path\1\";" \
$nargo_file
git commit --all --message "chore: replace relative paths to noir-protocol-circuits"
if ./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=master; then
git fetch # in case a commit came after this
git rebase origin/master
git commit --amend -m "$(git log -1 --pretty=%B) [skip ci]"
# restore old Nargo.toml
git restore --source=HEAD~1 -- $nargo_file
git commit --all --amend -m "$(git log -1 --pretty=%B) [skip ci]"
git push
fi

0 comments on commit b9ccf16

Please sign in to comment.