mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 08:50:42 +02:00
cli: add version command (#1726)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
ea4e9fa3aa
commit
e56e7e4b9e
4 changed files with 32 additions and 11 deletions
22
cmd/pomerium-cli/version.go
Normal file
22
cmd/pomerium-cli/version.go
Normal 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())
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue