From 5c6d9bb228ca1da3fef22854dae17830aa149ccc Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 3 Jan 2024 19:58:10 -0300 Subject: [PATCH 1/2] fix(docs): Fix docs build during releases Fixes the issue introduced in #3762, which caused the docs build step to always attempt to fetch the last released version. Due to how release-plase works, the last released version during a release is the version being released, which is not available as a tag to be fetched. To avoid this issue, we first check if the tag to be checked out is available, and if not, just load the code snippets from master. --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7237ac8093a..19d4d332027 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -877,10 +877,9 @@ jobs: - run: name: "Require released code" command: | - echo Requiring released code snippets - echo "INCLUDE_RELEASED_CODE=1" >> docs/.env LAST_TAG="aztec-packages-v$(jq -r '.["."]' .release-please-manifest.json)" - echo Fetching latest released tag $LAST_TAG + git ls-remote --tags origin | grep -q "$LAST_TAG" && echo "Using code released from $LAST_TAG" || { echo "Skipping as $LAST_TAG is not yet published" && exit 0; } + echo "INCLUDE_RELEASED_CODE=1" >> docs/.env git fetch origin --refetch --no-filter refs/tags/$LAST_TAG:refs/tags/$LAST_TAG - run: name: "Build docs" From 7c33ec8bf92c6dd22b4f34a4bce70ce49bde5114 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Thu, 4 Jan 2024 09:23:03 -0300 Subject: [PATCH 2/2] Fix conditional usage within pipefail in CCI --- .circleci/config.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 19d4d332027..747961f543a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -878,9 +878,13 @@ jobs: name: "Require released code" command: | LAST_TAG="aztec-packages-v$(jq -r '.["."]' .release-please-manifest.json)" - git ls-remote --tags origin | grep -q "$LAST_TAG" && echo "Using code released from $LAST_TAG" || { echo "Skipping as $LAST_TAG is not yet published" && exit 0; } - echo "INCLUDE_RELEASED_CODE=1" >> docs/.env - git fetch origin --refetch --no-filter refs/tags/$LAST_TAG:refs/tags/$LAST_TAG + if git ls-remote --tags origin | grep "$LAST_TAG" > /dev/null; then + echo "Using code released from $LAST_TAG" + echo "INCLUDE_RELEASED_CODE=1" >> docs/.env + git fetch origin --refetch --no-filter refs/tags/$LAST_TAG:refs/tags/$LAST_TAG + else + echo "Skipping as $LAST_TAG is not yet published" + fi - run: name: "Build docs" command: build docs