-
Notifications
You must be signed in to change notification settings - Fork 137
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add "tink docs" command for markdown and man page generation #272
Conversation
@@ -32,10 +32,9 @@ func completionCmd(name string) *cobra.Command { | |||
# To load completions for each session, execute once: | |||
$ tink-cli completion fish > ~/.config/fish/completions/tink-cli.fish | |||
`, | |||
DisableFlagsInUseLine: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this flag so that the completion
command is included in --help
.
Codecov Report
@@ Coverage Diff @@
## master #272 +/- ##
==========================================
+ Coverage 17.08% 20.61% +3.52%
==========================================
Files 9 15 +6
Lines 1264 1363 +99
==========================================
+ Hits 216 281 +65
- Misses 1036 1068 +32
- Partials 12 14 +2
Continue to review full report at Codecov.
|
@@ -15,6 +15,7 @@ var rootCmd = &cobra.Command{ | |||
Use: "tink", | |||
Short: "tinkerbell CLI", | |||
PersistentPreRunE: setupClient, | |||
DisableAutoGenTag: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prevents the markdown docs from creating datestamp jitter (diffs), should we include and require updated docs/ in each commit.
This looks great, does it require any sort of testing? |
@thebsdbox in an idea world, every line of code is tested. In this case, we have no tests for the This CLI is modeled after the Packet CLI which includes some E2E tests. We can use these as examples if we want to require added tests for this merge. https://github.com/packethost/packet-cli/tree/master/tests |
ab765e7
to
f8ef6b0
Compare
@thebsdbox Getting me to say the wrong thing is a sure way to get me to do the right thing. Tests added. |
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
0c38458
to
f0596c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, this looks great :-)
Description
This adds a
tink docs
command for generating both markdown and man pages.This could be introduced in the
Makefile
as a way to ship and keep updated markdown docs in the repository, but I have not enabled that.Why is this needed
Documentation about the tink commands is currently hand generated. Cobra allows for these to be autogenerated.
Man pages will help system operators learn about the available options. Man pages are also a requirement for Debian packages, should we want to explore that.
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
none
Checklist:
I have: