Merge pull request #8153 from zgfh/revert_group_command_feature

Revert "group command for easy read"
pull/8167/head
Matthew Fisher 4 years ago committed by GitHub
commit 128b9d053b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,7 +26,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd"
"k8s.io/kubectl/pkg/util/templates"
"helm.sh/helm/v3/internal/completion" "helm.sh/helm/v3/internal/completion"
"helm.sh/helm/v3/internal/experimental/registry" "helm.sh/helm/v3/internal/experimental/registry"
@ -133,47 +132,31 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string
flags.ParseErrorsWhitelist.UnknownFlags = true flags.ParseErrorsWhitelist.UnknownFlags = true
flags.Parse(args) flags.Parse(args)
commandGroups := templates.CommandGroups{ // Add subcommands
{ cmd.AddCommand(
Message: "Release Management Commands:", // chart commands
Commands: []*cobra.Command{
newInstallCmd(actionConfig, out),
newListCmd(actionConfig, out),
newGetCmd(actionConfig, out),
newStatusCmd(actionConfig, out),
newUpgradeCmd(actionConfig, out),
newHistoryCmd(actionConfig, out),
newRollbackCmd(actionConfig, out),
newReleaseTestCmd(actionConfig, out),
newUninstallCmd(actionConfig, out),
},
},
{
Message: "Chart Commands:",
Commands: []*cobra.Command{
newCreateCmd(out), newCreateCmd(out),
newDependencyCmd(out), newDependencyCmd(out),
newPackageCmd(out), newPullCmd(out),
newTemplateCmd(actionConfig, out), newShowCmd(out),
newLintCmd(out), newLintCmd(out),
newVerifyCmd(out), newPackageCmd(out),
},
},
{
Message: "Chart Repository Commands:",
Commands: []*cobra.Command{
newRepoCmd(out), newRepoCmd(out),
newSearchCmd(out), newSearchCmd(out),
newPullCmd(out), newVerifyCmd(out),
newShowCmd(out),
}, // release commands
}, newGetCmd(actionConfig, out),
} newHistoryCmd(actionConfig, out),
commandGroups.Add(cmd) newInstallCmd(actionConfig, out),
templates.ActsAsRootCommand(cmd, []string{"options"}, commandGroups...) newListCmd(actionConfig, out),
newReleaseTestCmd(actionConfig, out),
newRollbackCmd(actionConfig, out),
newStatusCmd(actionConfig, out),
newTemplateCmd(actionConfig, out),
newUninstallCmd(actionConfig, out),
newUpgradeCmd(actionConfig, out),
// Add subcommands
cmd.AddCommand(
newCompletionCmd(out), newCompletionCmd(out),
newEnvCmd(out), newEnvCmd(out),
newPluginCmd(out), newPluginCmd(out),

Loading…
Cancel
Save