Skip to content

Conversation

@maniac-en
Copy link
Owner

Summary

Fixes TUI footer showing 'dev' when installed via go install github.com/maniac-en/req@vX.Y.Z

Problem

  • v0.1.0-alpha.2 shows 'dev' in footer when installed via go install
  • Version injection only works for GitHub release binaries (via ldflags)
  • go install builds from source without ldflags

Solution

  • Add debug.ReadBuildInfo() to detect module version at runtime
  • Works automatically when go install uses specific version tags
  • Falls back to injected version for release builds

Test Plan

  • Local development: shows 'dev'
  • Release builds: shows injected version via ldflags
  • go install @vX.Y.Z: shows correct version from build info

Resolves version display issue for go install users.

- Use debug.ReadBuildInfo() to detect version from module info
- Fixes TUI footer showing 'dev' when installed via go install
- Falls back to injected version for release builds
- Resolves version display for go install github.com/maniac-en/req@vX.Y.Z
@github-actions
Copy link
Contributor

@maniac-en Go code formatting is required. Please run go fmt ./... to format your code and push the changes. Check the action logs for details on which files need formatting.

@maniac-en maniac-en merged commit 4a0a9aa into main Aug 24, 2025
4 checks passed
@maniac-en maniac-en deleted the fix/version-detection-go-install branch August 24, 2025 17:12
maniac-en added a commit that referenced this pull request Aug 24, 2025
Fix version detection for go install (#62)
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.

2 participants