Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate CLI docs. #192

Merged
merged 2 commits into from
Nov 21, 2022
Merged

Generate CLI docs. #192

merged 2 commits into from
Nov 21, 2022

Conversation

wlynch
Copy link
Member

@wlynch wlynch commented Nov 17, 2022

Summary

Generate CLI docs for all cobra commands.

Release Note

NONE

Documentation

馃摉 馃摉 馃摉

@wlynch wlynch force-pushed the cli-docs branch 2 times, most recently from 2f49f3c to 842da45 Compare November 17, 2022 21:40
@imjasonh imjasonh mentioned this pull request Nov 17, 2022
@imjasonh
Copy link
Member

imjasonh commented Nov 17, 2022

From experience, you may want a CI check that fails if these docs haven't been updated.

ko has this: https://github.com/ko-build/ko/blob/3cbbeb3ad3e0b02cf495c1cb9f3ac89fc9538997/hack/presubmit.sh#L29-L32

eddiezane
eddiezane previously approved these changes Nov 17, 2022
Copy link
Member

@eddiezane eddiezane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to presubmit

@@ -35,8 +33,6 @@ func main() {
}

rootCmd := root.New(cfg)
rootCmd.AddCommand(version.New(cfg))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for this other than to keep main clean?

Copy link
Member Author

@wlynch wlynch Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - the doc generator needs the subcommands to be added to pick them up. This moves the AddCommand's to the rootCmd creation to guarantee both main's have the same command tree.

Signed-off-by: Billy Lynch <billy@chainguard.dev>
Signed-off-by: Billy Lynch <billy@chainguard.dev>
@wlynch wlynch merged commit e9d33e8 into sigstore:main Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants