feat: add version command
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2021-07-20 23:59:47 +02:00
parent c9ba7aef20
commit 7b2100c568
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 16 additions and 1 deletions

View File

@ -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)

View File

@ -29,6 +29,7 @@ func RunApp(version, commit string) {
},
},
},
VersionCommand,
},
Flags: []cli.Flag{
EnvFlag,

14
cli/version.go Normal file
View File

@ -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
},
}