Skip to content

feat: Add 'eko version' command with runtime & git commit details #78

Description

@kavix

🎯 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

  1. Create cmd/version.go defining Cobra command versionCmd.
  2. Add global variables Version, Commit, BuildDate set via -ldflags during build.
  3. Wire -v / --version flag into cmd/root.go.
  4. Add unit test in cmd/commands_test.go.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions