cli: add version command (#1726)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
bobby 2020-12-29 20:04:32 -08:00 committed by GitHub
parent ea4e9fa3aa
commit e56e7e4b9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 11 deletions

View file

@ -0,0 +1,22 @@
package main
import (
"fmt"
"github.com/spf13/cobra"
"github.com/pomerium/pomerium/internal/version"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "version",
Long: `Print the cli version.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version.FullVersion())
},
}