🎯 Goal
Implement an eko version subcommand (and -v / --version flag on the root command) that prints CLI version details, Go runtime version, target OS/Arch, and Git commit hash.
💡 Expected Usage
$ eko version
eko version 1.1.0 (darwin/arm64)
Go version: go1.22.0
Git commit: 8c9d1a2f
🛠️ Implementation Steps
- Create
cmd/version.go defining Cobra command versionCmd.
- Add global variables
Version, Commit, BuildDate set via -ldflags during build.
- Wire
-v / --version flag into cmd/root.go.
- Add unit test in
cmd/commands_test.go.
🎯 Goal
Implement an
eko versionsubcommand (and-v/--versionflag on the root command) that prints CLI version details, Go runtime version, target OS/Arch, and Git commit hash.💡 Expected Usage
🛠️ Implementation Steps
cmd/version.godefining Cobra commandversionCmd.Version,Commit,BuildDateset via-ldflagsduring build.-v / --versionflag intocmd/root.go.cmd/commands_test.go.