Skip to content

Add version embedding with ldflags and dev fallback - #16

Merged
aniongithub merged 3 commits into
mainfrom
feature/release-version
May 5, 2026
Merged

Add version embedding with ldflags and dev fallback#16
aniongithub merged 3 commits into
mainfrom
feature/release-version

Conversation

@aniongithub

Copy link
Copy Markdown
Owner

Summary

Add version reporting to mind-map. Release builds embed the version tag, dev builds show the git commit hash.

Changes

  • main.version var set via -ldflags "-X main.version=vX.Y" at build time
  • getVersion() falls back to runtime/debug.BuildInfo VCS info for dev builds
  • mind-map --version prints the version (Cobra's built-in flag)
  • GET /api/version endpoint returns {"version": "..."} for the web UI
  • MCP server Implementation.Version set to the real version instead of hardcoded 0.1.0
  • Release workflow passes ${{ github.event.release.tag_name }} via ldflags

Examples

$ mind-map --version        # release
mind-map version v0.28

$ mind-map --version        # dev build
mind-map version dev (12ba927, dirty)

Closes #8 (partially -- version display done, favicon still TODO)

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.
@aniongithub
aniongithub merged commit fbc4d0a into main May 5, 2026
1 check passed
@aniongithub
aniongithub deleted the feature/release-version branch May 5, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show version in web UI and add favicon

1 participant