ggen_cli_lib/cmds/ci/
mod.rs1use clap::{Args, Subcommand};
2use ggen_utils::error::Result;
3
4pub mod pages;
6pub mod release;
7pub mod trigger;
8pub mod workflow;
9
10#[derive(Args, Debug)]
11pub struct CiCmd {
12 #[command(subcommand)]
13 pub verb: Verb,
14}
15
16#[derive(Subcommand, Debug)]
17pub enum Verb {
18 Pages(pages::PagesArgs),
20
21 Release(release::ReleaseArgs),
23
24 Workflow(workflow::WorkflowArgs),
26
27 Trigger(trigger::TriggerArgs),
29}
30
31impl CiCmd {
32 pub async fn run(&self) -> Result<()> {
33 match &self.verb {
34 Verb::Pages(args) => pages::run(args).await,
35 Verb::Release(args) => release::run(args).await,
36 Verb::Workflow(args) => workflow::run(args).await,
37 Verb::Trigger(args) => trigger::run(args).await,
38 }
39 }
40}