[PR #1411] [MERGED] fix(book-publish): bump version in BOTH per-volume index files #9083

Closed
opened 2026-05-03 01:19:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1411
Author: @profvjreddi
Created: 4/19/2026
Status: Merged
Merged: 4/20/2026
Merged by: @profvjreddi

Base: devHead: release-prep/book-version-bump-bothfiles


📝 Commits (1)

  • db6c161 fix(book-publish): bump version in BOTH per-volume index files

📊 Changes

1 file changed (+34 additions, -18 deletions)

View changed files

📝 .github/workflows/book-publish-live.yml (+34 -18)

📄 Description

Summary

PR-6 (#1410) routed each volume's /book/vol{N}/ URL to a new project-root index-vol{N}.qmd. The Update per-volume version in index.qmd step in book-publish-live.yml was written before that change and still only sed-updates contents/vol{N}/index.qmd. After the next book publish:

  • contents/vol1/index.qmddoi: \"v0.6.0\" (deep page)
  • index-vol1.qmddoi: \"v0.5.1\" (the actual public welcome page at /book/vol1/)

So readers would see the old version on the page they actually land on. This PR fixes that.

Change

  • Refactor the step into a bump_volume_doi <bare-version> <file...> helper.
  • Call it for both surfaces per volume:
    • index-vol{N}.qmd (project root, public welcome)
    • contents/vol{N}/index.qmd (sidebar Volume home)
  • Helper warns and skips on a missing file so a future config change that removes one surface doesn't fail the publish.
  • Comment block updated to spell out the two surfaces and why both must move in lockstep.
  • No behavior change for either file: same sed pattern, same commit message, same UPDATED_FILES gating, same downstream merge-to-main step.

How this came up

While answering "didn't the publish-live workflow handle the version bump automatically?" during TinyTorch v0.10.0 release prep. The TinyTorch workflow does fully automate the bump and PR-4's manual pre-bump was redundant (safe with explicit_version=0.10.0, but redundant). That led to checking the parallel book workflow and noticing this gap PR-6 had silently introduced.

Test plan

  • Workflow YAML is valid (yamllint / GitHub Actions parser)
  • Next book-publish-live run with a non-empty new_vol1_version updates both files and the resulting commit message lists both
  • If index-vol1.qmd ever gets removed/renamed, publish proceeds (warns instead of failing)

Risk

Trivial. One step, additive logic, defensive on missing files.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1411 **Author:** [@profvjreddi](https://github.com/profvjreddi) **Created:** 4/19/2026 **Status:** ✅ Merged **Merged:** 4/20/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `release-prep/book-version-bump-bothfiles` --- ### 📝 Commits (1) - [`db6c161`](https://github.com/harvard-edge/cs249r_book/commit/db6c161d5bd1636663ed40eba3ff409b7640b0d9) fix(book-publish): bump version in BOTH per-volume index files ### 📊 Changes **1 file changed** (+34 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/book-publish-live.yml` (+34 -18) </details> ### 📄 Description ## Summary PR-6 (#1410) routed each volume's `/book/vol{N}/` URL to a new project-root `index-vol{N}.qmd`. The `Update per-volume version in index.qmd` step in `book-publish-live.yml` was written before that change and still only sed-updates `contents/vol{N}/index.qmd`. After the next book publish: - `contents/vol1/index.qmd` → `doi: \"v0.6.0\"` ✅ (deep page) - `index-vol1.qmd` → `doi: \"v0.5.1\"` ❌ (the actual public welcome page at `/book/vol1/`) So readers would see the **old** version on the page they actually land on. This PR fixes that. ## Change - Refactor the step into a `bump_volume_doi <bare-version> <file...>` helper. - Call it for both surfaces per volume: - `index-vol{N}.qmd` (project root, public welcome) - `contents/vol{N}/index.qmd` (sidebar Volume home) - Helper warns and skips on a missing file so a future config change that removes one surface doesn't fail the publish. - Comment block updated to spell out the two surfaces and why both must move in lockstep. - No behavior change for either file: same `sed` pattern, same commit message, same `UPDATED_FILES` gating, same downstream merge-to-main step. ## How this came up While answering \"didn't the publish-live workflow handle the version bump automatically?\" during TinyTorch v0.10.0 release prep. The TinyTorch workflow does fully automate the bump and PR-4's manual pre-bump was redundant (safe with `explicit_version=0.10.0`, but redundant). That led to checking the parallel book workflow and noticing this gap PR-6 had silently introduced. ## Test plan - [ ] Workflow YAML is valid (`yamllint` / GitHub Actions parser) - [ ] Next book-publish-live run with a non-empty `new_vol1_version` updates both files and the resulting commit message lists both - [ ] If `index-vol1.qmd` ever gets removed/renamed, publish proceeds (warns instead of failing) ## Risk Trivial. One step, additive logic, defensive on missing files. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-03 01:19:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#9083