Skip to content

Commit

Permalink
fix(docs): Fix docs build during releases (#3815)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
spalladino authored Jan 4, 2024
1 parent 022a918 commit 2e0776a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -892,11 +892,14 @@ 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 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
Expand Down

0 comments on commit 2e0776a

Please sign in to comment.