jpictl: add --version and version command
from `git describe` using go:generate and embed Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
+5
-2
@@ -2,6 +2,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -12,8 +14,9 @@ const (
|
||||
|
||||
var (
|
||||
rootCmd = &cobra.Command{
|
||||
Use: CmdName,
|
||||
Short: "control tool for jpi.cloud",
|
||||
Use: CmdName,
|
||||
Short: "control tool for jpi.cloud",
|
||||
Version: version,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user