Skip to content

fix: correctly populate 'version' of MCP server #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025
Merged

Conversation

sd2k
Copy link
Collaborator

@sd2k sd2k commented Jun 24, 2025

This uses the runtime/debug package to get the version of the binary
at build time, which in turn uses git information to populate the
version string.

When running from source using go run the version is set to
(devel).

When installed using either go install or go build the version is
populated like so:

❯ ./dist/mcp-grafana -version
v0.5.1-0.20250624101014-217ec1a1e5ee
@sd2k sd2k requested a review from a team as a code owner June 24, 2025 10:12
This uses the `runtime/debug` package to get the version of the binary
at build time, which in turn uses git information to populate the
version string.

When running from source using `go run` the version is set to
`(devel)`.

When installed using either `go install` or `go build` the version is
populated like so:

```sh
❯ ./dist/mcp-grafana -version
v0.5.1-0.20250624101014-217ec1a1e5ee
```
@sd2k sd2k force-pushed the add-version-flag branch from b33ded0 to 4d3d38d Compare June 24, 2025 13:16
@sd2k sd2k merged commit 43a92b2 into main Jun 24, 2025
12 checks passed
@sd2k sd2k deleted the add-version-flag branch June 24, 2025 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants