mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 23:16:37 +08:00
make build
This commit is contained in:
@@ -24,6 +24,13 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// Version is the application version string. It is set at link time via:
|
||||
//
|
||||
// -ldflags="-X github.com/Rain-kl/Wavelet/internal/cmd.Version=<version>"
|
||||
//
|
||||
// When not set (e.g. local `go run`), the value defaults to "dev".
|
||||
var Version = "dev"
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "wavelet",
|
||||
PreRun: func(_ *cobra.Command, _ []string) {
|
||||
@@ -52,6 +59,7 @@ var rootCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.Version = Version
|
||||
rootCmd.CompletionOptions.DisableDefaultCmd = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user