mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore: disable auto generated tag for CLI docs (#5905)
This was causing `make gen` to fail as the days went on!
This commit is contained in:
@ -9,6 +9,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/cobra/doc"
|
||||
|
||||
"github.com/coder/coder/buildinfo"
|
||||
@ -63,6 +64,16 @@ func main() {
|
||||
markdownDocsDir := path.Join(basePath, "docs/cli")
|
||||
manifestFilepath := path.Join(basePath, "docs/manifest.json")
|
||||
|
||||
// Disables the "Auto generated by spf13/cobra" tag
|
||||
var disableAutoGenTag func(cmd *cobra.Command)
|
||||
disableAutoGenTag = func(cmd *cobra.Command) {
|
||||
for _, c := range cmd.Commands() {
|
||||
disableAutoGenTag(c)
|
||||
}
|
||||
cmd.DisableAutoGenTag = true
|
||||
}
|
||||
disableAutoGenTag(cmd)
|
||||
|
||||
// Generate markdown
|
||||
err = doc.GenMarkdownTree(cmd, markdownDocsDir)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user