mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
32 lines
634 B
Go
32 lines
634 B
Go
package cli
|
|
|
|
import (
|
|
"github.com/kolide/kolide/server/config"
|
|
"github.com/kolide/kolide/server/version"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func createVersionCmd(configManager config.Manager) *cobra.Command {
|
|
// flags
|
|
var (
|
|
fFull bool
|
|
)
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print kolide version",
|
|
Long: `
|
|
Print version information and related build info`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
if fFull {
|
|
version.PrintFull()
|
|
return
|
|
}
|
|
version.Print()
|
|
},
|
|
}
|
|
|
|
versionCmd.PersistentFlags().BoolVar(&fFull, "full", false, "print full version information")
|
|
|
|
return versionCmd
|
|
}
|