Repository navigation
promtop: show the version in the terminal UI, the web page and promtop version - #8
Merged
Merged
Conversation
…p version -version printed "dev" for anything but a release build, and neither the terminal UI nor the web page showed a version at all. internal/version picks it from the release ldflags, else the module version (go install …@v0.3.0, or promtop/dash built into a service), else the git tag or commit of a local build. The help screen (?) and the web page next to the name show it, the w key's dashboard and dash included; "promtop version" prints it like -version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01US3HyE2LFapBHwkSQRKHsv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01US3HyE2LFapBHwkSQRKHsv
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.
Why
promtop -versionprinteddevfor anything but a release build, becausego installdoes not set ldflags. Neither the terminal UI nor the web page showed a version, and the flag was missing from the README.What
internal/version.Getworks out the version in this order:0.3.0go install …@v0.3.00.3.00.3.0+dirtypromtop/dashinside a serviceWhere it shows:
promtop version, as well as-version.?): "promtop 0.3.0 — live terminal view…".wkey's dashboard anddash. The value comes in the frame'sversionfield.dashuses the same package for itsUser-Agent.Tests
internal/versioncovers each build kind, including a replaced dependency.versioncommand.make testandgolangci-lintpass."version":"0.3.0+dirty".This PR is independent of #7.
🤖 Generated with Claude Code
https://claude.ai/code/session_01US3HyE2LFapBHwkSQRKHsv