Show release notes for all versions of MUSE2 in old versions of docs#1268
Show release notes for all versions of MUSE2 in old versions of docs#1268
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1268 +/- ##
=======================================
Coverage 89.76% 89.76%
=======================================
Files 57 57
Lines 8210 8210
Branches 8210 8210
=======================================
Hits 7370 7370
Misses 544 544
Partials 296 296 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the “old docs” build pipeline so older documentation versions always include the latest MUSE2 release notes (avoiding confusing partial release-note navigation in historical docs), and makes the old-docs build process safer to modify by switching from checkout-in-place to per-release git worktrees.
Changes:
- Add “release notes” anchor markers in
docs/SUMMARY.md(and via patches in v2.0.0/v2.1.0) so the old-docs builder can replace the release-notes section consistently. - Update
docs/build_old_docs.pyto (a) build each release from its owngit worktree, and (b) inject the current release-notes TOC + link/syncdocs/release_notesinto each old-docs build. - Add a v2.0.0 patch to include the “Other versions of documentation” placeholder chapter (fixes #1189).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/build_old_docs.py | Switches old-doc builds to worktrees and patches old SUMMARY.md + release_notes directory to always use latest release notes. |
| docs/SUMMARY.md | Adds anchor comments delimiting the release-notes section for extraction/substitution. |
| docs/release/patches/v2.1.0/0001-SUMMARY.md-Add-release-notes-anchors.patch | Adds release-notes anchors to v2.1.0 docs so the builder can replace that section. |
| docs/release/patches/v2.0.0/0002-Add-placeholder-other-versions-of-docs-chapter.patch | Adds “Other versions of documentation” entry to v2.0.0 SUMMARY. |
| docs/release/patches/v2.0.0/0003-SUMMARY.md-Add-release-notes-anchors.patch | Adds release-notes anchors to v2.0.0 SUMMARY so the builder can inject current release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| for line in lines: | ||
| if RELEASE_NOTES_START_ANCHOR in line: | ||
| assert not found_start_anchor |
Description
When you navigate to an old version of the docs (since v2.1.0), there will be chapters for release notes for all the different versions of MUSE2 listed in the navigation bar, but it will only show the release notes that were bundled in the old version of the docs, i.e. no newer versions. For v2.0.0, there are no release notes included in the docs anyway, which is less of a problem, but only showing release notes for some versions of MUSE2 is potentially confusing. This isn't a problem now, but once we've released v2.2.0, the release notes for this won't appear in the docs for v2.1.0 etc., so we should fix it.
I've changed the
build_old_docs.pyscript to substitute in the release notes from the dev version of the docs, so they should always be up to date. It does this by patchingSUMMARY.md(which has the TOC) and symlinking/copying thedocs/release_notesfolder. I had to add a couple of patch files to the old versions of the docs to make this work, but we shouldn't need to do this going forward.As part of this, I changed the way the git repo is used. Previously, we cloned the whole thing to a temp dir, then checked out the different versions one by one. Now that we're mucking about with the git tree by deleting files etc., it makes it messier to change between the different tags, so I switched to using a different worktree for each instead.
While I was at it, I fixed #1189.
Closes #1251. Closes #1189.
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks