Conversation
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
|
✔️ Deploy Preview for cert-manager-website ready! 🔨 Explore the source changes: 52afa25 🔍 Inspect the deploy log: https://app.netlify.com/sites/cert-manager-website/deploys/61efee0d64c00500086bfbe7 😎 Browse the preview: https://deploy-preview-800--cert-manager-website.netlify.app |
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
|
/retest |
|
/retest |
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
update gitignore Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
|
Updated after discussion with team today. Previous version CLI reference docs are added to git, current and next version will always be generated - as they are likely to change while you are working with the docs |
|
|
||
| mkdir -p "${REPO_ROOT}/content/en/${outputdir}/cli/" | ||
|
|
||
| output=$(go run "$target/main.go" --help) |
There was a problem hiding this comment.
question: was continuing the work of generating the documentation via cobra considered? https://github.com/jetstack/cert-manager/blob/master/tools/cobra/main.go
Not a huge thing, but it does give a sightlier better output format, and can be configured with headers etc.
There was a problem hiding this comment.
Going forward it could definitely make sense to build on top of that, the new website will not be based on Hugo so it could be we need something purpose-built rather than this simple script.
At this stage we decided to simply use the output of --help, and we wanted the CLI reference for older versions.
There was a problem hiding this comment.
Tested it a bit now and it's not a huge change to use the tool you linked for the versions where it's available, but it requires some work on both ends and I'm not sure it's worth it? Given the upcoming website refresh
There was a problem hiding this comment.
Thought: I'm surprised that --help doesn't output to standard error.
jakexks
left a comment
There was a problem hiding this comment.
This is definitely an improvement over not having anything at all, so I think it should merge.
I agree with Josh that the output format could use some work in future, but the website is about to go through a big style overhaul so I'm not too worried about it right now.
The .gitignore overrides were discussed with others in the team, I have no real opinion on this as long as it doesn't conflict with the other doc generation steps.
/lgtm
/hold
Placing a hold for anyone who chatted with @jahrlin earlier to also review, if they like.
|
|
||
| mkdir -p "${REPO_ROOT}/content/en/${outputdir}/cli/" | ||
|
|
||
| output=$(go run "$target/main.go" --help) |
There was a problem hiding this comment.
Thought: I'm surprised that --help doesn't output to standard error.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jahrlin, jakexks The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
|
/lgtm |
|
/unhold |
Fixes cert-manager/cert-manager#4458
adds a new function
genclireferencethat will attempt to runmain.go --helpfor our CLIs and writes the output to markdown files for each version of the docs.contains some crude checks to cover some corner cases where some CLIs don't exist for older releases, or when they don't produce any output from
--help(pre-cobra)the preview deployment does not seem to include generated docs.
result examples:

