diff options
| author | datdenkikniet <jcdra1@gmail.com> | 2023-04-14 23:59:23 +0200 |
|---|---|---|
| committer | datdenkikniet <jcdra1@gmail.com> | 2023-04-16 13:08:46 +0200 |
| commit | 63b7024cb98717dd785ae888f419002b9835c6b1 (patch) | |
| tree | b65d1bc57d1f10c76cb053542095668b94246f09 /xtask/src/main.rs | |
| parent | cba786529a7e34ed623df5f7cde5aae762a8c55c (diff) | |
xtask: build usage examples and general improvements
Diffstat (limited to 'xtask/src/main.rs')
| -rw-r--r-- | xtask/src/main.rs | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 2bfe851..2b45f23 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -23,10 +23,7 @@ use log::{error, info, log_enabled, trace, Level}; use crate::{ argument_parsing::{Backends, BuildOrCheck, Cli, Commands}, build::init_build_dir, - cargo_commands::{ - build_and_check_size, cargo, cargo_book, cargo_clippy, cargo_doc, cargo_example, - cargo_format, cargo_test, run_test, - }, + cargo_commands::*, command::{handle_results, run_command, run_successful, CargoCommand}, }; @@ -152,6 +149,12 @@ fn main() -> anyhow::Result<()> { trace!("default logging level: {0}", globals.verbose); + log::debug!( + "Stderr of child processes is inherited: {}", + globals.stderr_inherited + ); + log::debug!("Partial features: {}", globals.partial); + let backend = if let Some(backend) = globals.backend { backend } else { @@ -285,6 +288,14 @@ fn main() -> anyhow::Result<()> { info!("Running mdbook"); cargo_book(globals, &args.arguments) } + Commands::UsageExamplesCheck(examples) => { + info!("Checking usage examples"); + cargo_usage_example(globals, BuildOrCheck::Check, examples.examples()?) + } + Commands::UsageExampleBuild(examples) => { + info!("Building usage examples"); + cargo_usage_example(globals, BuildOrCheck::Build, examples.examples()?) + } }; handle_results(globals, final_run_results) @@ -347,7 +358,9 @@ fn command_parser( | CargoCommand::Doc { .. } | CargoCommand::Test { .. } | CargoCommand::Book { .. } - | CargoCommand::ExampleSize { .. } => { + | CargoCommand::ExampleSize { .. } + | CargoCommand::BuildInDir { .. } + | CargoCommand::CheckInDir { .. } => { let cargo_result = run_command(command, output_mode)?; Ok(cargo_result) } |
