diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-22 20:35:31 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-22 20:35:31 +0800 |
| commit | f73b054eaa7c0b858628d2e4ec18ca96376f4c35 (patch) | |
| tree | 1d605b53b9fb75738be991a48cf4d5c614dc66c6 /.run/src/bin/deploy-api-docs.rs | |
| parent | 7c1db7cdaa218d32272533d98ba7cd1095138ed1 (diff) | |
feat(doc): replace deploy-api-docs script with direct cargo commands
Diffstat (limited to '.run/src/bin/deploy-api-docs.rs')
| -rw-r--r-- | .run/src/bin/deploy-api-docs.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/.run/src/bin/deploy-api-docs.rs b/.run/src/bin/deploy-api-docs.rs index ac4486e..961eb04 100644 --- a/.run/src/bin/deploy-api-docs.rs +++ b/.run/src/bin/deploy-api-docs.rs @@ -6,9 +6,8 @@ use tools::{println_cargo_style, run_cmd}; const OUTPUT_DIR: &str = "docs/api-docs"; fn main() { - let (using_docsrs, open) = Picker::from_args() + let using_docsrs = Picker::from_args() .pick_or_default(&arg![docsrs: bool]) - .pick_or_default(&arg![open: bool, 'O']) .unwrap(); let repo_root = find_git_repo().expect("Failed to find git repository root"); @@ -28,15 +27,13 @@ fn main() { // Build cargo doc command let cmd = if using_docsrs { format!( - "cargo +nightly rustdoc {} --features \"{}\" -p mingling --target-dir \"{}\" --color always -- --cfg docsrs", - if open { "--open" } else { "" }, + "cargo +nightly rustdoc --features \"{}\" -p mingling --target-dir \"{}\" --color always -- --cfg docsrs", features_arg, output_path.join("target").to_string_lossy() ) } else { format!( - "cargo doc --no-deps {} --features \"{}\" -p mingling --target-dir \"{}\" --color always", - if open { "--open" } else { "" }, + "cargo doc --no-deps --features \"{}\" -p mingling --target-dir \"{}\" --color always", features_arg, output_path.join("target").to_string_lossy() ) |
