a877aed45f
Change-Id: I16cd7730c1e0732253ac52f51010f6b813295aa7
29 lines
526 B
Go
29 lines
526 B
Go
package version
|
|
|
|
// Author: Weisen Pan
|
|
// Date: 2023-10-24
|
|
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
// VERSION is the version of CSI Pangu Driver.
|
|
VERSION = ""
|
|
// COMMITID is the commit ID of the code.
|
|
COMMITID = ""
|
|
)
|
|
|
|
// VersionCmd represents the command to print the version of simon.
|
|
var VersionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the version of simon",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Printf("Version: %s\n", VERSION)
|
|
fmt.Printf("Commit: %s\n", COMMITID)
|
|
},
|
|
}
|