Add version embedding with ldflags and dev fallback - #16
Merged
Conversation
Set version at build time with -ldflags '-X main.version=vX.Y'. For dev builds, fall back to VCS info from runtime/debug.BuildInfo (short commit hash + dirty flag). - mind-map --version prints the version - GET /api/version returns it as JSON - MCP server reports it in the Implementation.Version field - Release workflow passes the GitHub release tag via ldflags Examples: Release: mind-map version v0.28 Dev: mind-map version dev (12ba927, dirty)
MCP clients like GitHub Copilot require a 'tools': ['*'] field in the server config to expose tools. Without it, the server is registered but no tools are discoverable. Update install.sh, install.ps1, README.md, and SKILL.md.
GitHub Copilot requires 'type': 'local' and 'args': [] in the MCP server config for the server to appear in the UI and expose tools. Update install.sh, install.ps1, README.md, and SKILL.md.
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
Add version reporting to mind-map. Release builds embed the version tag, dev builds show the git commit hash.
Changes
main.versionvar set via-ldflags "-X main.version=vX.Y"at build timegetVersion()falls back toruntime/debug.BuildInfoVCS info for dev buildsmind-map --versionprints the version (Cobra's built-in flag)GET /api/versionendpoint returns{"version": "..."}for the web UIImplementation.Versionset to the real version instead of hardcoded0.1.0${{ github.event.release.tag_name }}via ldflagsExamples
Closes #8 (partially -- version display done, favicon still TODO)