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 | |
| parent | 7c1db7cdaa218d32272533d98ba7cd1095138ed1 (diff) | |
feat(doc): replace deploy-api-docs script with direct cargo commands
Diffstat (limited to '.run')
| -rw-r--r-- | .run/src/bin/deploy-api-docs.rs | 9 | ||||
| -rw-r--r-- | .run/src/bin/doc-nightly.ps1 | 7 | ||||
| -rw-r--r-- | .run/src/bin/doc-nightly.sh | 7 | ||||
| -rw-r--r-- | .run/src/bin/doc.ps1 | 6 | ||||
| -rwxr-xr-x | .run/src/bin/doc.sh | 6 |
5 files changed, 25 insertions, 10 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() ) diff --git a/.run/src/bin/doc-nightly.ps1 b/.run/src/bin/doc-nightly.ps1 index 3d8289e..30d6aaf 100644 --- a/.run/src/bin/doc-nightly.ps1 +++ b/.run/src/bin/doc-nightly.ps1 @@ -1 +1,6 @@ -cargo dev_tool deploy-api-docs -- --docsrs --open +cargo +nightly rustdoc ` + --manifest-path mingling/Cargo.toml ` + --features docs_rs,core,macros,builds,structural_renderer,repl,comp,parser,picker,clap,extra_macros ` + --open ` + -- ` + --cfg docsrs diff --git a/.run/src/bin/doc-nightly.sh b/.run/src/bin/doc-nightly.sh index 10f9021..944f4b3 100644 --- a/.run/src/bin/doc-nightly.sh +++ b/.run/src/bin/doc-nightly.sh @@ -1,3 +1,8 @@ #!/bin/bash -cargo dev_tool deploy-api-docs -- --docsrs --open +cargo rustdoc \ + --manifest-path mingling/Cargo.toml \ + --features docs_rs,core,macros,builds,structural_renderer,repl,comp,parser,picker,clap,extra_macros \ + --open \ + -- \ + --cfg docsrs diff --git a/.run/src/bin/doc.ps1 b/.run/src/bin/doc.ps1 index 7c3f222..0e55141 100644 --- a/.run/src/bin/doc.ps1 +++ b/.run/src/bin/doc.ps1 @@ -1 +1,5 @@ -cargo dev_tool deploy-api-docs -- --open +cargo doc ` + --manifest-path mingling/Cargo.toml ` + --no-deps ` + --features docs_rs,core,macros,builds,structural_renderer,repl,comp,parser,picker,clap,extra_macros ` + --open diff --git a/.run/src/bin/doc.sh b/.run/src/bin/doc.sh index 8c809b7..014ea44 100755 --- a/.run/src/bin/doc.sh +++ b/.run/src/bin/doc.sh @@ -1,3 +1,7 @@ #!/bin/bash -cargo dev_tool deploy-api-docs -- --open +cargo doc \ + --manifest-path mingling/Cargo.toml \ + --no-deps \ + --features docs_rs,core,macros,builds,structural_renderer,repl,comp,parser,picker,clap,extra_macros \ + --open |
