Skip to content

chore: upgrade Go to 1.25 and improve versioning via VCS metadata and build flags#3

Merged
fajarhide merged 1 commit into
mainfrom
fix/docker
Mar 31, 2026
Merged

chore: upgrade Go to 1.25 and improve versioning via VCS metadata and build flags#3
fajarhide merged 1 commit into
mainfrom
fix/docker

Conversation

@fajarhide

@fajarhide fajarhide commented Mar 31, 2026

Copy link
Copy Markdown
Owner

PR Auto Describe

🚀 Summary

This PR upgrades the entire project to Go 1.25, implements proper automatic version tracking for all built binaries, and standardises version resolution across every build path. Version values will now correctly populate for CI releases, local make builds, and direct go install usage.


🔑 Key Changes

✅ Go 1.22 → 1.25 upgrade across all environments
✅ Automatic version injection for all build pipelines
✅ Fallback VCS metadata resolution for unflagged builds
✅ Unified version output for all execution methods


📋 Detailed Breakdown

Go Runtime Upgrade

Updated Go version consistently across all locations:

  • GitHub release workflow
  • Containerfile builder base image
  • README version badge

Build Pipeline Changes

  • Release CI: inject git tag name via ldflags at build time
  • Makefile: auto-detect version via git describe, fallback to dev
  • All build commands now include consistent -X main.Version ldflag
  • Makefile now prints active version during build output

Runtime Version Logic

  • Default base version changed from hardcoded v0.1.1dev
  • Added getVersion() resolver with ordered fallback chain:
    1. Use explicitly injected version if set
    2. Read native Go build info VCS metadata
    3. Extract 7 char commit hash + dirty working tree state
    4. Fall back to plain dev if all resolution fails
  • All version CLI commands now use this unified resolver

🧠 Notes

No manual version bump commits will be required for future releases. Version will automatically resolve correctly for tagged releases, development builds, and direct go install usage from source.


⚠️ Breaking Changes

None. All existing functionality and APIs are fully preserved. This is a backwards compatible improvement.

@fajarhide fajarhide merged commit dba060f into main Mar 31, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant