Skip to content

Commit

Permalink
chore: move bolt cluster subcommand to root
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed May 22, 2024
1 parent a45b6c2 commit 38ac41f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ use bolt_core::{
};
use clap::Parser;

mod cluster;

#[derive(Parser)]
pub enum SubCommand {
/// Generates a login link for the given access token. Automatically turns the existing user into an
Expand All @@ -16,11 +14,6 @@ pub enum SubCommand {
#[clap(default_value = "root")]
name: String,
},
/// Cluster related operations
Cluster {
#[clap(subcommand)]
command: cluster::SubCommand,
},
}

impl SubCommand {
Expand All @@ -38,7 +31,6 @@ impl SubCommand {

Ok(())
}
Self::Cluster { command } => command.execute(ctx).await,
}
}
}
File renamed without changes.
1 change: 1 addition & 0 deletions lib/bolt/cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub mod admin;
pub mod check;
pub mod cluster;
pub mod config;
pub mod create;
pub mod db;
Expand Down
6 changes: 6 additions & 0 deletions lib/bolt/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ enum SubCommand {
#[clap(subcommand)]
command: db::SubCommand,
},
/// Cluster related operations
Cluster {
#[clap(subcommand)]
command: cluster::SubCommand,
},
/// Provides admin functionality.
Admin {
#[clap(subcommand)]
Expand Down Expand Up @@ -127,6 +132,7 @@ async fn main_inner() -> Result<std::process::ExitCode> {
SubCommand::Terraform { command } => command.execute(ctx).await?,
SubCommand::Ssh { command } => command.execute(ctx).await?,
SubCommand::Database { command } => command.execute(ctx).await?,
SubCommand::Cluster { command } => command.execute(ctx).await?,
SubCommand::Admin { command } => command.execute(ctx).await?,
}

Expand Down

0 comments on commit 38ac41f

Please sign in to comment.