Compare commits
4 Commits
ratatui-v0
...
codex/gith
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ed557fb75 | ||
|
|
9240853447 | ||
|
|
17fed8346f | ||
|
|
133dc7f45b |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -201,7 +201,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2
|
||||
- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
|
||||
with:
|
||||
tool: cargo-rdme
|
||||
tool: cargo-hack,cargo-rdme
|
||||
- run: cargo xtask readme --check
|
||||
|
||||
# Run cargo rustdoc with the same options that would be used by docs.rs, taking into account the
|
||||
|
||||
@@ -10,31 +10,25 @@ pub struct Readme {
|
||||
check: bool,
|
||||
}
|
||||
|
||||
/// The projects that should have their README.md generated from the source code.
|
||||
///
|
||||
/// Notably, we removed `ratatui` from this list as we have a more specifically crafted README for
|
||||
/// the main crate.
|
||||
const PROJECTS: &[&str] = &[
|
||||
"ratatui-core",
|
||||
"ratatui-crossterm",
|
||||
"ratatui-macros",
|
||||
"ratatui-termion",
|
||||
"ratatui-termwiz",
|
||||
"ratatui-widgets",
|
||||
];
|
||||
|
||||
impl Run for Readme {
|
||||
fn run(self) -> Result<()> {
|
||||
// This would be simpler perhaps with cargo-hack, however cargo-rdme does not support the
|
||||
// `--manifest-path` option that is required for this to work, so it's easiest to hard code
|
||||
// the package names here. See https://github.com/orium/cargo-rdme/issues/261
|
||||
for package in PROJECTS {
|
||||
let mut args = vec!["rdme", "--workspace-project", package];
|
||||
if self.check {
|
||||
args.push("--check");
|
||||
}
|
||||
run_cargo(args)?;
|
||||
// Delegate workspace traversal to cargo-hack so we don't have to call cargo-rdme for each
|
||||
// package manually. We still exclude the `ratatui` crate because its README is
|
||||
// hand-crafted rather than generated from doc comments.
|
||||
let mut args = vec![
|
||||
"hack",
|
||||
"--workspace",
|
||||
"--ignore-private",
|
||||
"--exclude",
|
||||
"ratatui",
|
||||
"rdme",
|
||||
];
|
||||
|
||||
if self.check {
|
||||
args.push("--check");
|
||||
}
|
||||
|
||||
run_cargo(args)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user