make build

This commit is contained in:
ryan
2026-06-09 21:40:01 +08:00
parent 05ef5ed7bd
commit 32e4a32462
6 changed files with 181 additions and 14 deletions
+8
View File
@@ -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
}