Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions bin/docs/build-dev-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ pnpm exec generate-docs \
--output ./docs-shopify.dev/generated

# Copy generated v2 docs to shopify-dev in the world repo if available: the World tree this
# checkout is in, else the root World tree of a standalone checkout.
# checkout is in, else the root World tree of a standalone checkout. A World tree without the
# shopify-dev zone skips the copy, so it never writes into another tree.
WORLD_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || true)"
if [ -z "$WORLD_ROOT" ] || [ ! -d "$WORLD_ROOT/areas/platforms/shopify-dev" ]; then
if [ -n "$WORLD_ROOT" ] && [ -f "$WORLD_ROOT/.meta/manifest.json" ]; then
if [ ! -d "$WORLD_ROOT/areas/platforms/shopify-dev" ]; then
echo "Skipped copying generated_docs_data_v2.json: this World tree has no shopify-dev zone (add it from here with: tec checkout add ../shopify-dev)"
exit 0
fi
else
WORLD_ROOT="$HOME/world/trees/root/src"
fi
WORLD_DEST="$WORLD_ROOT/areas/platforms/shopify-dev/db/data/docs/templated_apis/shopify_cli"
Expand Down
Loading