Skip to content

Commit 223f993

Browse files
committed
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.
1 parent 3048d08 commit 223f993

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.circleci/config.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -877,10 +877,9 @@ jobs:
877877
- run:
878878
name: "Require released code"
879879
command: |
880-
echo Requiring released code snippets
881-
echo "INCLUDE_RELEASED_CODE=1" >> docs/.env
882880
LAST_TAG="aztec-packages-v$(jq -r '.["."]' .release-please-manifest.json)"
883-
echo Fetching latest released tag $LAST_TAG
881+
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; }
882+
echo "INCLUDE_RELEASED_CODE=1" >> docs/.env
884883
git fetch origin --refetch --no-filter refs/tags/$LAST_TAG:refs/tags/$LAST_TAG
885884
- run:
886885
name: "Build docs"

0 commit comments

Comments
 (0)