diff --git a/TODO.md b/TODO.md index 79b13016..e92615fa 100644 --- a/TODO.md +++ b/TODO.md @@ -35,7 +35,7 @@ Disclaimer!: List is WIP - [ ] `release` - [ ] `versions` - [ ] `abra upgrade` - - [ ] `version` + - [x] `version` - [ ] `doctor` - [ ] Refactor code and good comments - [ ] Automated builds and releases (for all OS's and archs) diff --git a/cli/cli.go b/cli/cli.go index c19ec03d..0200b8e1 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -29,6 +29,7 @@ func RunApp(version, commit string) { }, }, }, + VersionCommand, }, Flags: []cli.Flag{ EnvFlag, diff --git a/cli/version.go b/cli/version.go new file mode 100644 index 00000000..b4441af5 --- /dev/null +++ b/cli/version.go @@ -0,0 +1,14 @@ +package cli + +import ( + "github.com/urfave/cli/v2" +) + +var VersionCommand = &cli.Command{ + Name: "version", + Usage: "Print the version", + Action: func(c *cli.Context) error { + cli.VersionPrinter(c) + return nil + }, +}