From 29a892d705fa0ef00b2d8c973d84e5f188664b7b Mon Sep 17 00:00:00 2001 From: John McBride Date: Wed, 29 Apr 2020 08:47:53 -0600 Subject: [PATCH] Add documentation for doc generation and a changelog --- CHANGELOG.md | 22 ++++++++++++++++++++++ README.md | 6 +----- doc/README.md | 12 ++++++++++++ 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 doc/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..2f8ea99b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,22 @@ +# Cobra Changelog + +## Pending +* Fix man page documentation won't have auto generated tag when `cmd.DisableAutoGenTag = true` @jpmcb + +## v1.0.0 +Announcing v1.0.0 of Cobra. 🎉 +**Notable Changes** +* Fish completion (including support for Go custom completion) @marckhouzam +* API (urgent): Rename BashCompDirectives to ShellCompDirectives @marckhouzam +* Remove/replace SetOutput on Command - deprecated @jpmcb +* add support for autolabel stale PR @xchapter7x +* Add Labeler Actions @xchapter7x +* Custom completions coded in Go (instead of Bash) @marckhouzam +* Partial Revert of #922 @jharshman +* Add Makefile to project @jharshman +* Correct documentation for InOrStdin @desponda +* Apply formatting to templates @jharshman +* Revert change so help is printed on stdout again @marckhouzam +* Update md2man to v2.0.0 @pdf +* update viper to v1.4.0 @umarcor +* Update cmd/root.go example in README.md @jharshman diff --git a/README.md b/README.md index a3713660..0c21fc58 100644 --- a/README.md +++ b/README.md @@ -718,11 +718,7 @@ Run 'kubectl help' for usage. ## Generating documentation for your command -Cobra can generate documentation based on subcommands, flags, etc. in the following formats: - -- [Markdown](doc/md_docs.md) -- [ReStructured Text](doc/rest_docs.md) -- [Man Page](doc/man_docs.md) +Cobra can generate documentation based on subcommands, flags, etc. Read more about it in the [docs generation documentation](doc/README.md): ## Generating bash completions diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 00000000..6ea4eb66 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,12 @@ +# Documentation generation + +- [Man page docs](./man_docs.md) +- [Markdown docs](./md_docs.md) +- [Rest docs](./rest_docs.md) +- [Yaml docs](./yaml_docs.md) + +## Options +### `DisableAutoGenTag` +You may set `cmd.DisableAutoGenTag = true` +to _entirely_ remove the auto generated string "Auto generated by spf13/cobra..." +from any documentation source.