1
0
mirror of https://github.com/smallstep/cli.git synced 2026-10-24 11:19:19 +03:00
Files
step-ca-cli/command/version/version.go
Mariano Cano c58db6b98b Initial commit
2018-07-17 16:06:17 -07:00

28 lines
491 B
Go

package version
import (
"fmt"
"github.com/urfave/cli"
"github.com/smallstep/cli/command"
"github.com/smallstep/cli/config"
)
func init() {
cmd := cli.Command{
Name: "version",
Usage: "Displays the current version of the cli",
Action: Command,
}
command.Register(cmd)
}
// Command prints out the current version of the tool
func Command(c *cli.Context) error {
fmt.Printf("%s\n", config.Version())
fmt.Printf("Release Date: %s\n", config.ReleaseDate())
return nil
}