2022-03-22 11:03:15 -04:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2022-04-06 04:36:58 -04:00
|
|
|
"github.com/edgelesssys/constellation/internal/constants"
|
2022-03-22 11:03:15 -04:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func newVersionCmd() *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "version",
|
|
|
|
Short: "Display version of this CLI",
|
2022-05-06 11:51:41 -04:00
|
|
|
Long: "Display version of this CLI.",
|
2022-03-22 11:03:15 -04:00
|
|
|
Args: cobra.NoArgs,
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
2022-04-06 04:36:58 -04:00
|
|
|
cmd.Printf("CLI Version: v%s \n", constants.CliVersion)
|
2022-03-22 11:03:15 -04:00
|
|
|
},
|
|
|
|
}
|
|
|
|
return cmd
|
|
|
|
}
|