mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
23 lines
582 B
Rust
23 lines
582 B
Rust
|
use clap::{command, Parser};
|
||
|
|
||
|
#[derive(Parser, Debug)]
|
||
|
struct PublishAllCratesArgs {}
|
||
|
|
||
|
fn main() {
|
||
|
let matches = command!()
|
||
|
.propagate_version(true)
|
||
|
.subcommand_required(true)
|
||
|
.arg_required_else_help(true)
|
||
|
.subcommand(clap::Command::new("publish").about("Publishes agb and all subcrates"))
|
||
|
.get_matches();
|
||
|
|
||
|
match matches.subcommand() {
|
||
|
Some(("publish", _)) => publish(),
|
||
|
_ => unreachable!("Exhausted list of subcommands and subcommand_required prevents `None`"),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn publish() {
|
||
|
println!("publishing!");
|
||
|
}
|