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:
2024-03-02 23:15:56 +00:00
parent 45dc2291bf
commit 09bec11506
3 changed files with 37 additions and 2 deletions
+5 -2
View File
@@ -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,
}
)