From f41e0a3bb5154a197c6689b52806c4e6c2af658a Mon Sep 17 00:00:00 2001 From: Zheng Xi Zhou Date: Wed, 12 Jan 2022 11:35:41 +0800 Subject: [PATCH] Fix: change `vela def gen-doc` to `vela def doc-gen` (#3078) * Fix: change `vela def gen-doc` to `vela def doc-gen` Address the comments to change the command line name Co-authored-by: Jianbo Sun Signed-off-by: Zheng Xi Zhou * fix CI Signed-off-by: Zheng Xi Zhou Co-authored-by: Jianbo Sun --- references/cli/def.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/references/cli/def.go b/references/cli/def.go index 91fd93ff1..2a0b74749 100644 --- a/references/cli/def.go +++ b/references/cli/def.go @@ -411,15 +411,14 @@ func NewDefinitionGetCommand(c common.Args) *cobra.Command { return cmd } -// NewDefinitionGenDocCommand create the `vela def gen-doc` command to generate documentation of definitions +// NewDefinitionGenDocCommand create the `vela def doc-gen` command to generate documentation of definitions func NewDefinitionGenDocCommand(c common.Args) *cobra.Command { cmd := &cobra.Command{ - Use: "gen-doc NAME", - Short: "Generate documentation of definitions (Only Terraform typed definitions are supported)", - Long: "Generate documentation of definitions", - Hidden: true, + Use: "doc-gen NAME", + Short: "Generate documentation of definitions (Only Terraform typed definitions are supported)", + Long: "Generate documentation of definitions", Example: "1. Generate documentation for ComponentDefinition alibaba-vpc:\n" + - "> vela def gen-doc alibaba-vpc -n vela-system\n", + "> vela def doc-gen alibaba-vpc -n vela-system\n", RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return fmt.Errorf("please specify definition name")