feat(docs): use versioned MCPB download links with __VERSION__ placeholder#200
Merged
feat(docs): use versioned MCPB download links with __VERSION__ placeholder#200
Conversation
…older - Add __VERSION__ placeholder to inject-tool-refs.ts - Version sourced from RELEASE_VERSION env (CI) or package.json (fallback) - Convert docs/clients/claude-desktop.md to template (.md.in) - Add download attribute to prevent Vue Router interception - Update docs.yml to pass RELEASE_VERSION from latest GitHub release Fixes #199
Test Coverage ReportOverall Coverage: 93.78%
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR implements versioned MCPB download links by introducing a __VERSION__ placeholder system that gets replaced at documentation build time with the actual version from GitHub release tags or package.json.
Changes:
- Added
getVersion()function to extract version fromRELEASE_VERSIONenv var (set by CI) or fall back to package.json - Renamed
replaceCountPlaceholders()toreplacePlaceholders()and added__VERSION__support alongside existing count placeholders - Converted three documentation files to
.md.intemplates that use the__VERSION__placeholder for MCPB download links - Updated CI workflow to extract version from latest GitHub release tag and pass it via
RELEASE_VERSIONenv var - Added
downloadattribute to all MCPB links to prevent Vue Router interception - Updated VitePress config's
ignoreDeadLinkspattern to match versioned filenames
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/cli/inject-tool-refs.ts |
Added getVersion() function and expanded placeholder replacement to support __VERSION__ |
tests/unit/cli/inject-tool-refs.test.ts |
Added comprehensive tests for getVersion() and updated existing tests for renamed function and version placeholder |
docs/index.md.in |
Converted to template with versioned MCPB link and download attribute |
docs/guide/installation/claude-desktop.md.in |
Converted to template with versioned MCPB links and download attribute |
docs/clients/claude-desktop.md.in |
Converted to template with versioned MCPB link and download attribute |
docs/.vitepress/config.mts |
Updated ignoreDeadLinks regex to match versioned filenames pattern |
.github/workflows/docs.yml |
Reordered steps to extract version before generating docs, passing it via RELEASE_VERSION env var |
Log the selected MCPB version when falling back to package.json, matching the logging pattern used for GitHub release versions.
Change button label from "Download gitlab-mcp.mcpb (v__VERSION__)" to "Download gitlab-mcp-__VERSION__.mcpb" to match actual filename.
Add nullish coalescing fallback to return "0.0.0" when package.json exists but lacks a version field. Add test for this edge case.
|
🎉 This PR is included in version 6.44.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__VERSION__placeholder support toinject-tool-refs.tsfor versioned download URLsdocs/clients/claude-desktop.mdto template (.md.in) for dynamic version injectiondownloadattribute to MCPB links to bypass Vue Router interceptiondocs.ymlworkflow to passRELEASE_VERSIONfrom latest GitHub release tagProblem
MCPB download links were:
gitlab-mcp-latest.mcpbwhich doesn't indicate the actual versionSolution
Links now use versioned filenames like
gitlab-mcp-6.43.0.mcpb:__VERSION__placeholder replaced at docs build timeRELEASE_VERSIONenv (CI) orpackage.json(fallback)downloadattribute ensures browser downloads file directlyTest plan
inject-tool-refs.ts(58 tests)Fixes #199