Skip to content

Commit

Permalink
fix(docs): Fix docs build during releases
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 committed Jan 3, 2024
1 parent 3048d08 commit c609ba8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c609ba8

Please sign in to comment.