From dcc5f9694ac49db45d1b4bd82fc84636634c29a9 Mon Sep 17 00:00:00 2001 From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com> Date: Sat, 1 Nov 2025 23:30:30 +0000 Subject: [PATCH] Update automation scripts for versions/ directory structure --- README.md | 11 +++++++++-- docs-versions.vendor_folders.sh | 8 ++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d492f8e..34e0ffc 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,18 @@ This tool implements the improvements outlined in [Bazel Docs: Why It Might Be T https://bazel.online +## Repository Structure + +- **Root directory**: Contains the latest (HEAD) documentation +- **versions/ directory**: Contains version-specific documentation (e.g., `versions/8.4.2/`, `versions/7.7.0/`) +- **upstream/**: Git submodule containing the source Bazel repository + ## How it works -1. Clones the Devsite source from `bazel.build/docs` using a git submodule. +1. Clones the Devsite source from `bazel.build/docs` using a git submodule (`upstream/`). 2. Transforms Devsite frontmatter and directory layout into MDX format. -3. Hosted on Mintlify +3. Version-specific docs are organized in the `versions/` directory. +4. Hosted on Mintlify at https://bazel.online ## Usage diff --git a/docs-versions.vendor_folders.sh b/docs-versions.vendor_folders.sh index 229504f..83beaf2 100755 --- a/docs-versions.vendor_folders.sh +++ b/docs-versions.vendor_folders.sh @@ -16,7 +16,7 @@ VERSIONS=$(jq -r '.[] | select(. != "HEAD")' docs-versions.json) # Check which folders are missing and create them for VERSION in $VERSIONS; do - if [ ! -d "$VERSION" ]; then + if [ ! -d "versions/$VERSION" ]; then echo "Creating missing folder for version: $VERSION" # Change to upstream directory and reset to the specific tag @@ -29,12 +29,12 @@ for VERSION in $VERSIONS; do cd .. # Run the copy-upstream-docs.sh script with the version directory - echo "Copying docs to directory: $VERSION" - ./copy-upstream-docs.sh "$VERSION" + echo "Copying docs to directory: versions/$VERSION" + ./copy-upstream-docs.sh "versions/$VERSION" echo "Successfully created docs for version $VERSION" else - echo "Folder $VERSION already exists, skipping" + echo "Folder versions/$VERSION already exists, skipping" fi done