Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
bda242422d
commit
30587b2f97
@ -46,14 +46,17 @@ impl CuddleCI {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn execute(&mut self, args: impl IntoIterator<Item = &str>) -> eyre::Result<()> {
|
pub async fn execute(
|
||||||
|
&mut self,
|
||||||
|
args: impl IntoIterator<Item = impl Into<String>>,
|
||||||
|
) -> eyre::Result<()> {
|
||||||
let matches = clap::Command::new("cuddle-ci")
|
let matches = clap::Command::new("cuddle-ci")
|
||||||
.about("is a wrapper around common CI actions")
|
.about("is a wrapper around common CI actions")
|
||||||
.subcommand(clap::Command::new("pr"))
|
.subcommand(clap::Command::new("pr"))
|
||||||
.subcommand(clap::Command::new("main"))
|
.subcommand(clap::Command::new("main"))
|
||||||
.subcommand(clap::Command::new("release"))
|
.subcommand(clap::Command::new("release"))
|
||||||
.subcommand_required(true)
|
.subcommand_required(true)
|
||||||
.try_get_matches_from(args.into_iter())?;
|
.try_get_matches_from(args.into_iter().map(|a| a.into()).collect::<Vec<String>>())?;
|
||||||
|
|
||||||
match matches.subcommand() {
|
match matches.subcommand() {
|
||||||
Some((name, args)) => match (name, args) {
|
Some((name, args)) => match (name, args) {
|
||||||
|
Loading…
Reference in New Issue
Block a user