-
Notifications
You must be signed in to change notification settings - Fork 280
Generate CLI reference #3083
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
Generate CLI reference #3083
Conversation
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.
Thanks for looking into this @itowlson. Can you also commit the initial CLI.md?
Cargo.toml
Outdated
@@ -19,6 +19,7 @@ anyhow = { workspace = true } | |||
async-trait = { workspace = true } | |||
bytes = { workspace = true } | |||
clap = { version = "3.2.24", features = ["derive", "env"] } | |||
clap-markdown = { git = "https://github.com/itowlson/clap-markdown", branch = "clap-v3-compat" } |
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.
Should we move the fork to spinframework's repo?
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.
I am not sure what to do with the fork. It can't live in my personal account I agree. But it feels awkward to have something so disconnected from Spin and so specifically about Clap in spinframework. Maybe that's just me. We could make it a crate in the Spin project, but then we would lose traceability to the original repo and author, which feels rude.
Anyway I'm happy to follow whatever you and other folks more steeped on open-source etiquette advise!
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.
That is a good point. I think we can leave it as a fork on your account but can you add a comment as to why we have a fork and the condition of leaving the fork, which seems to be if/when we move to clap 3?
1beb547
to
2029539
Compare
@kate-goldenring I wasn't planning to commit the generated Markdown. I thought that was going to go to the docs site? I don't want to get into a position where anyone working on the CLI has to remember to regenerate the Markdown and commit the changes - I was more imagining this command running in CI as part of a release (and hopefully PRing to the docs repo so that all we need to do is mash the approve and merge button). |
Signed-off-by: itowlson <[email protected]>
2029539
to
4dfec70
Compare
I tweaked this so it defaults to writing to stdout. My thought is that we can have a GH workflow (or step in the release workflow) that does something like:
(We can't use I think we've done something like the PR thing before, but I'm a bit lost on the details, sorry. (ETA: Rajat's plugin PR creator uses a Spin app in the cloud to create the PR.) I did it manually locally and the results look okay, a bit doubled up on the top heading, and the code block on the subheads isn't lovely, but perfectly acceptable for compliance purposes I think. And in dark mode: |
@itowlson this all looks great. IMO, i think we can move this to ready for review and then integrate it with the docs CI as you mention |
After discussion with @kate-goldenring I've moved the forked third-party code into the project (rather than having a separate repo unrelated to the Spin project). I've tried to provide appropriate attribution and credit, and have reproduced the licences and copyright statements. I've done this as a separate commit so we can easily unpick the change if I've done it wrong or I was wrong to do it! Thoughts welcome. |
Signed-off-by: itowlson <[email protected]>
bc18647
to
58de6cc
Compare
An experiment in support of spinframework/spin-docs#72
cc @kate-goldenring
e.g.
spin maintenance generate-reference -o REFME.md