From 7f45061336245d72c2494e0a3db9fd54999b9539 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 28 Jul 2026 15:06:46 +0000 Subject: [PATCH] Rewrite spec links when promoting draft to a dated version The promote step now self-dates /specification/draft/ links in the copied spec, docs, and schema trees. --- .github/workflows/cut-release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/cut-release.yml b/.github/workflows/cut-release.yml index 5fd7dca12..c27bb89ee 100644 --- a/.github/workflows/cut-release.yml +++ b/.github/workflows/cut-release.yml @@ -103,6 +103,16 @@ jobs: cp -r docs/docs/draft "docs/docs/$VERSION" grep -rl "/docs/draft/" "docs/docs/$VERSION" \ | xargs -r sed -i "s|/docs/draft/|/docs/$VERSION/|g" + # Keep intra-tree spec links inside the new version too: the copied + # spec pages, docs pages, and schema.ts doc comments all link to + # /specification/draft/... — mirror what rewrite() in the docs.json + # step already does for nav paths (and what the hand-cut 2025-11-25 + # snapshot did). schema.json/schema.mdx are regenerated from + # schema.ts by `npm run generate` below, so stamping schema.ts is + # sufficient for the schema artifacts. + grep -rl "/specification/draft/" \ + "docs/specification/$VERSION" "docs/docs/$VERSION" "schema/$VERSION" \ + | xargs -r sed -i "s|/specification/draft/|/specification/$VERSION/|g" - name: Regenerate schema artifacts run: |