aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/main.rs')
-rw-r--r--xtask/src/main.rs19+19 −0
1 files changed, 19 insertions, 0 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
new file mode 100644
--- /dev/null
+++ b/xtask/src/main.rs
@@ -0,0 +1,19 @@
+// SPDX-FileCopyrightText: 2026 Nikolay Govorov
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+fn main() -> Result<(), Box<dyn std::error::Error>> {
+ let args: Vec<String> = std::env::args().skip(1).collect();
+
+ match args.first().map(|s| s.as_str()) {
+ Some("licenses") => {
+ let json = xtask::licenses::generate_json("crates/recluse/Cargo.toml")?;
+ println!("{json}");
+ Ok(())
+ }
+ Some(cmd) => Err(format!("unknown command: {cmd}").into()),
+ None => Err(
+ "usage: cargo xtask <command>\n\ncommands:\n licenses Generate dependency license JSON"
+ .into(),
+ ),
+ }
+}