feat: added goreleaser and versioning strategy#25
Conversation
📝 WalkthroughWalkthroughThis PR introduces release automation and version tracking capabilities. It adds a GitHub Actions workflow triggered by git tags, includes a GoReleaser configuration for building multi-platform binaries, enhances the Makefile with versioning metadata injection and new test/lint targets, adds a CLI Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
.github/workflows/release.yml.goreleaser.yamlMakefilecmd/gomodel/main.gointernal/version/version.go
🧰 Additional context used
📓 Path-based instructions (1)
cmd/gomodel/main.go
📄 CodeRabbit inference engine (CLAUDE.md)
Provider packages must be imported in
cmd/gomodel/main.gousing blank imports (_ "gomodel/internal/providers/{name}")
Files:
cmd/gomodel/main.go
🧠 Learnings (2)
📚 Learning: 2025-12-26T16:40:36.115Z
Learnt from: CR
Repo: ENTERPILOT/GOModel PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-26T16:40:36.115Z
Learning: Applies to internal/cache/**/*.go : Cache structure must include Version, UpdatedAt timestamp, and Models map with modelID as key mapping to CachedModel info
Applied to files:
.goreleaser.yamlMakefilecmd/gomodel/main.go
📚 Learning: 2025-12-26T16:40:36.115Z
Learnt from: CR
Repo: ENTERPILOT/GOModel PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-26T16:40:36.115Z
Learning: Applies to internal/cache/**/*.go : Model registry must support both local file cache and Redis cache backends for instant startup and multi-instance deployments
Applied to files:
cmd/gomodel/main.go
🧬 Code graph analysis (1)
cmd/gomodel/main.go (1)
internal/version/version.go (4)
Info(16-18)Version(10-10)Commit(11-11)Date(12-12)
🔇 Additional comments (6)
internal/version/version.go (1)
1-18: LGTM! Standard version injection pattern implemented correctly.The version package follows best practices for build-time metadata injection:
- Exported variables with sensible defaults for development builds
- Info() function provides a well-formatted version string including Go runtime version
- Ready for ldflags injection from build tools
cmd/gomodel/main.go (2)
75-82: LGTM! Version flag handling is correctly positioned.The version flag check is appropriately placed before other initialization, enabling fast exit when users run
gomodel --versionorgomodel -version.
88-93: LGTM! Version logging aids troubleshooting.Logging version metadata (version, commit, build_date) at startup using structured logging is a best practice that helps with debugging and tracking deployed versions.
.github/workflows/release.yml (1)
1-32: LGTM! Standard release automation workflow.The workflow correctly implements automated releases:
- Triggered by semver tags (v*)
- Required permissions and full git history for changelog generation
- Current action versions (checkout@v4, setup-go@v5, goreleaser-action@v6)
- Standard goreleaser invocation with
--cleanflagMakefile (2)
3-11: LGTM! Robust version metadata extraction.The version info extraction follows best practices:
git describe --tags --always --dirtyprovides comprehensive version info with fallback- Short commit hash from
git rev-parse- UTC timestamps in ISO 8601 format
?=operator allows environment variable overrides for CI/CD flexibilityThe LDFLAGS construction correctly injects metadata into
gomodel/internal/version.*variables.
19-45: LGTM! Comprehensive development and testing targets.The new Makefile targets enhance the development workflow:
clean: removes build artifactstidy: maintains clean dependenciestest/test-e2e/test-all: structured testing approachlint/lint-fix: code quality enforcement including e2e testsAll targets follow Makefile conventions and use appropriate flags.
Summary by CodeRabbit
Release Notes
New Features
--versionflag to display application version, commit, and build date informationChores
✏️ Tip: You can customize this high-level summary in your review settings.