-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
docs: regenerate markdown #4884
Conversation
I think something is broken .. somewhere. Trying to re-generate docs from the master branch ( |
@@ -13,7 +13,7 @@ Attach local standard input, output, and error streams to a running container | |||
|:----------------|:---------|:--------|:----------------------------------------------------| | |||
| `--detach-keys` | `string` | | Override the key sequence for detaching a container | | |||
| `--no-stdin` | | | Do not attach STDIN | |
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.
Wonder if we should always display bool
type even if it defaults to false
? Would need changes in cli-docs-tool
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.
good one, yes. Looking at the string
above, effectively that's the same;
- always show type
- but don't show default if there's no default (or if default == type's empty value??)
(last part doesn't look consistent there though, because --cpu-shares
shows 0
as default, which is also the default for an int64
- wondering why that is 🤔
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.
we purposefully hide zero values when rendering the pages on docs.docker.com atm
https://github.com/docker/docs/blob/main/layouts/_default/cli.html#L118
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.
Yes, so funny thing is that there's some "special code" for membytes, which describes we did so for Cobra to hide it 🤔
Lines 446 to 450 in f6b7a11
func (m *MemBytes) String() string { | |
// NOTE: In spf13/pflag/flag.go, "0" is considered as "zero value" while "0 B" is not. | |
// We return "0" in case value is 0 here so that the default value is hidden. | |
// (Sometimes "default 0 B" is actually misleading) | |
if m.Value() != 0 { |
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.
Opened docker/cli-docs-tool#50 to display bool type
oh fun! so it does re-generate on master as well, but ... with the old version? Did we forget to update some version somewhere? 🤔 |
Ah! We did! There's two separate cli/scripts/docs/generate-md.sh Line 5 in f6b7a11
cli/scripts/docs/generate-yaml.sh Line 5 in f6b7a11
|
Signed-off-by: Sebastiaan van Stijn <[email protected]>
696500e
to
f2e98f9
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4884 +/- ##
=======================================
Coverage 61.32% 61.32%
=======================================
Files 287 287
Lines 20063 20063
=======================================
Hits 12303 12303
Misses 6867 6867
Partials 893 893 |
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.
LGTM
docs: regenerate markdown
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)