You've already forked step-ca-cli
mirror of
https://github.com/smallstep/cli.git
synced 2026-10-24 11:19:19 +03:00
28 lines
490 B
Go
28 lines
490 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: "display 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
|
|
}
|