Add version flag to kanctl
Adding version flag to kanctl
#k10-888
@@ -4,6 +4,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
+ kanister "github.com/kanisterio/kanister/pkg"
"github.com/kanisterio/kanister/pkg/kube"
)
@@ -25,6 +26,7 @@ func newRootCommand() *cobra.Command {
rootCmd := &cobra.Command{
Use: "kanctl [common options...] <command>",
Short: "A set of helpers to help with creating ActionSets",
+ Version: kanister.VERSION,
}
rootCmd.PersistentFlags().StringP(namespaceFlagName, "n", "", "Override namespace obtained from kubectl context")
rootCmd.AddCommand(newPerformFromCommand())
