Primarily, add a - helper to easily get information on what pulls in a crate (hey Mr Piotr we can consider moving this up in the namespace to also use this elsewhere) - helper to extract a list of GPUI crates in order which need publishing Release Notes: - N/A
56 lines
2.3 KiB
Rust
56 lines
2.3 KiB
Rust
mod tasks;
|
|
mod workspace;
|
|
|
|
use anyhow::Result;
|
|
use clap::{Parser, Subcommand};
|
|
|
|
#[derive(Parser)]
|
|
#[command(name = "cargo xtask")]
|
|
struct Args {
|
|
#[command(subcommand)]
|
|
command: CliCommand,
|
|
}
|
|
|
|
#[derive(Subcommand)]
|
|
enum CliCommand {
|
|
/// Runs `cargo clippy`.
|
|
Clippy(tasks::clippy::ClippyArgs),
|
|
Compliance(tasks::compliance::ComplianceArgs),
|
|
Licenses(tasks::licenses::LicensesArgs),
|
|
/// Checks that packages conform to a set of standards.
|
|
PackageConformity(tasks::package_conformity::PackageConformityArgs),
|
|
/// Inspect the GPUI publish plan and its dependencies.
|
|
#[command(subcommand)]
|
|
Gpui(tasks::gpui::GpuiCommand),
|
|
/// Runs the Linux Bubblewrap sandboxing NixOS VM tests.
|
|
SandboxTests(tasks::sandbox_tests::SandboxTestsArgs),
|
|
/// Runs the Windows WSL Bubblewrap sandbox behavior tests.
|
|
WslSandboxTests(tasks::wsl_sandbox_tests::WslSandboxTestsArgs),
|
|
/// Downloads the pinned `webrtc-sys` release and configures `LK_CUSTOM_WEBRTC`.
|
|
SetupWebrtc(tasks::setup_webrtc::SetupWebrtcArgs),
|
|
/// Builds GPUI web examples and serves them.
|
|
WebExamples(tasks::web_examples::WebExamplesArgs),
|
|
Workflows(tasks::workflows::GenerateWorkflowArgs),
|
|
CheckWorkflows(tasks::workflow_checks::WorkflowValidationArgs),
|
|
}
|
|
|
|
fn main() -> Result<()> {
|
|
let args = Args::parse();
|
|
|
|
match args.command {
|
|
CliCommand::Clippy(args) => tasks::clippy::run_clippy(args),
|
|
CliCommand::Compliance(args) => tasks::compliance::check_compliance(args),
|
|
CliCommand::Licenses(args) => tasks::licenses::run_licenses(args),
|
|
CliCommand::PackageConformity(args) => {
|
|
tasks::package_conformity::run_package_conformity(args)
|
|
}
|
|
CliCommand::Gpui(args) => tasks::gpui::run_gpui(args),
|
|
CliCommand::SandboxTests(args) => tasks::sandbox_tests::run_sandbox_tests(args),
|
|
CliCommand::WslSandboxTests(args) => tasks::wsl_sandbox_tests::run_wsl_sandbox_tests(args),
|
|
CliCommand::SetupWebrtc(args) => tasks::setup_webrtc::run_setup_webrtc(args),
|
|
CliCommand::WebExamples(args) => tasks::web_examples::run_web_examples(args),
|
|
CliCommand::Workflows(args) => tasks::workflows::run_workflows(args),
|
|
CliCommand::CheckWorkflows(args) => tasks::workflow_checks::validate(args),
|
|
}
|
|
}
|