Matches ctl version to upstream

This commit is contained in:
2026-03-28 20:28:22 +08:00
parent 848daefffe
commit ecceff225f
25 changed files with 591 additions and 159 deletions

View File

@@ -0,0 +1,22 @@
package apply
import (
"fmt"
"github.com/spf13/cobra"
buildInfo "undecided.project/monok8s/pkg/buildinfo"
)
func NewCmdVersion() *cobra.Command {
cmd := &cobra.Command{
Use: "version",
Short: "Print the version information",
RunE: func(cmd *cobra.Command, _ []string) error {
_, err := fmt.Fprintln(cmd.OutOrStdout(), buildInfo.Version)
return err
},
}
return cmd
}