Repository navigation
chore(release): regenerate server-card and auto-add v3 deprecation notice - #846
Conversation
…tice - Regenerate .well-known/mcp/server-card.json via scripts/generate-server-card.ts right after the patch bump in both bump paths, verify serverInfo.version matches, and stage it in the release commit. Generation failure or version mismatch aborts. - Append the #815 deprecation notice to generated release notes while the release major is below DEPRECATION_NOTICE_UNTIL_MAJOR (3), so v3.0.0+ drops it automatically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
Motivation
Two things in recent releases needed fixing by hand after
npm run release:server-card.jsonkeeps falling behind..well-known/mcp/server-card.jsonhasserverInfo.versiontaken frompackage.json, butrelease.shnever regenerates it. It still says2.2.4while the package is2.2.5; docs: sync server-card version with package.json (2.2.5) #845 is a one-off fix for that. This PR stops it from happening again.What changed (
scripts/release.shonly)sync_server_card_version "$NEW_VERSION": a new helper called in both patch-bump paths ("tag already exists" and "no existing tag"), right aftersync_registry_metadata_version, so it runs afternpm version patch. It:npx tsx scripts/generate-server-card.ts. No build is needed: tsx resolves../tools/registry.jstotools/registry.ts, so it doesn't matter that this runs beforebuild_docs;serverInfo.versionequals$NEW_VERSION;git add "$SERVER_CARD_FILE"sits next to the existingserver.jsonadd in both bump paths, so the card goes into thechore(release): vX.Y.Zcommit.deprecation_notice "$version": prints the Deprecation notice: legacy env vars and CLI flags will be removed in v3.0.0 #815 notice (same wording as v2.2.4/v2.2.5) when the release's major version is belowDEPRECATION_NOTICE_UNTIL_MAJOR=3. If the version doesn't parse, it prints nothing.generate_changelog_notesadds it as the last section, after Contributors, which is where it was in v2.2.4 and v2.2.5.< 3get the notice, and v3.0.0+ drops it without any further edit. To stop it earlier, or to reuse it for another major, change that one constant.gitlab_api_requestsecurity note from v2.2.5 is not included.is_bot_pr) is unchanged.Everything else in
release.sh(branch/alignment checks, tag logic, docs pinning, registry preflight,build_docs, push,gh release create) works as before. The only other diff line removes trailing whitespace from one blank line.This does not touch
server-card.json; the current version bump is #845.How it was tested (safe only — no release was run)
bash -n scripts/release.shpasses.shellcheckgives the same 2 warnings (SC2034) before and after; nothing new.release.shand ran them on their own, never the release path:deprecation_notice:2.2.6and2.99.0print the notice;3.0.0,3.0.1,10.0.0,garbageand empty print nothing.generate_changelog_noteswith a stubbedgh(no network) overv2.2.4..HEAD:2.2.6notes end with the notice after Contributors and3.0.0notes have no notice. In both, thegithub-actions[bot]PR (chore(homebrew): sync formula for release #843) is still filtered out.sync_server_card_versionin a throwawaygit worktree(npm ci --ignore-scripts, so nobuild/), after a fakenpm version patch(2.2.5 → 2.2.6): the card regenerated (275 tools) withserverInfo.version == 2.2.6. The only diff from the committed card was the version line, so the formatting is byte-identical. A version mismatch exits non-zero, a missing generator exits non-zero, and under plainset -ethe caller stops.No release was run: no
npm run release, no tags pushed, nogh release create, no publish.