From bce2d9944004dfeed3fd4e75808e68b4369ff3b6 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Thu, 21 Dec 2023 14:18:04 -0300 Subject: [PATCH] fix(docs): Make git repo available when building docs (#3761) This is a quick and dirty fix to get docs to load released code snippets again. We should not need to pass the entire git repo to the build context to make it work, but it should buy us some time until we ship a proper solution (see #3754). --- .circleci/config.yml | 5 ++++- docs/Dockerfile.dockerignore | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 31bb8ce214c..cd95a730443 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -856,8 +856,11 @@ jobs: name: "Configure build for master" command: | if [ "$CIRCLE_BRANCH" == "master" ]; then - echo "Configuring build for master" + echo Configuring build for master 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 fi - run: name: "Build docs" diff --git a/docs/Dockerfile.dockerignore b/docs/Dockerfile.dockerignore index 68acaf472fa..ab13fbd2925 100644 --- a/docs/Dockerfile.dockerignore +++ b/docs/Dockerfile.dockerignore @@ -9,4 +9,7 @@ docs/node_modules !barretenberg/cpp/src/barretenberg !circuits/cpp/src !.release-please-manifest.json -!boxes \ No newline at end of file +!boxes + +# Docs build fetches code snippets from the last release using git show. +!.git \ No newline at end of file