Skip to content

Commit

Permalink
fix: pull noir (#5699)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad authored Apr 11, 2024
1 parent 3db6dd1 commit bf35464
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/pull_noir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ jobs:
PR_URL=$(gh pr list --repo AztecProtocol/aztec-packages --head sync-noir --json url --jq ".[0].url")
echo "PR_URL=$PR_URL" >> $GITHUB_ENV
# What was our last merge on noir side?
BASE_NOIR_COMMIT=`gh pr list --repo=noir-lang/noir --state merged --head aztec-packages --json mergeCommit --jq=.[0].mergeCommit.oid`
# Detect our last sync commit (written by this action before pushing) with a fallback for the first time we ever do this
BASE_NOIR_COMMIT=$(curl https://raw.githubusercontent.com/AztecProtocol/aztec-packages/master/.noir-sync-commit)
if [ "$BASE_NOIR_COMMIT" = "404: Not Found" ] ; then
BASE_NOIR_COMMIT="50d2735825454a8638a308156d4ea23b3c4420d8"
fi
echo "BASE_NOIR_COMMIT=$BASE_NOIR_COMMIT" >> $GITHUB_ENV
# What was our last sync on aztec side?
BASE_AZTEC_COMMIT=`curl https://raw.githubusercontent.com/noir-lang/noir/master/.aztec-sync-commit`
Expand Down Expand Up @@ -88,6 +92,9 @@ jobs:
# we need to commit for git-subrepo
git commit -am "[$LINES changes] $COMMIT_MESSAGE"
if ./scripts/git-subrepo/lib/git-subrepo pull --force $SUBREPO_PATH --branch=master; then
# Read our actual commit sync from git subrepo, stash to file for next time
COMMIT=$(git config --file="$SUBREPO_PATH/.gitrepo" subrepo.commit)
echo "$COMMIT" > .noir-sync-commit && git add .noir-sync-commit
git reset --soft "$BASE_AZTEC_COMMIT"
# We don't really need the sync commit on our side, and don't need .gitrepo at all except just in time for the command.
git checkout origin/master -- noir/noir-repo/.aztec-sync-commit noir/noir-repo/.gitrepo
Expand All @@ -114,7 +121,7 @@ jobs:
- name: Update PR
run: |
set -xue # print commands
# Formatted for updating the PR, overrides for release-please commit message parsing
# Formatted for updating the PR, overrides for release-please commit message parsing
PR_BODY="""
Automated pull of development from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
Expand Down

0 comments on commit bf35464

Please sign in to comment.