From 5780d55587b5d61b4f6021aaa412f65738214aa9 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Wed, 21 Feb 2024 06:33:23 +0100 Subject: [PATCH] feat: move client into a client file Signed-off-by: kjuulh --- crates/flux-releaser/src/cli.rs | 14 +------------- crates/flux-releaser/src/cli/client.rs | 11 +++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 crates/flux-releaser/src/cli/client.rs diff --git a/crates/flux-releaser/src/cli.rs b/crates/flux-releaser/src/cli.rs index d3ff164..e923ef6 100644 --- a/crates/flux-releaser/src/cli.rs +++ b/crates/flux-releaser/src/cli.rs @@ -3,20 +3,8 @@ use std::net::SocketAddr; use crate::services::flux_local_cluster::extensions::FluxLocalClusterManagerExt; +pub mod client; pub mod server; -pub mod client { - use crate::app::{LocalApp, SharedLocalApp}; - - pub async fn get_local_app(registry: impl Into) -> anyhow::Result { - tracing_subscriber::fmt::init(); - - tracing::debug!("Starting client commit"); - - let app = SharedLocalApp::new(LocalApp::new(registry).await?); - - Ok(app) - } -} #[derive(Parser)] #[command(author, version, about, long_about = None, subcommand_required = true)] diff --git a/crates/flux-releaser/src/cli/client.rs b/crates/flux-releaser/src/cli/client.rs new file mode 100644 index 0000000..0dd0fc9 --- /dev/null +++ b/crates/flux-releaser/src/cli/client.rs @@ -0,0 +1,11 @@ +use crate::app::{LocalApp, SharedLocalApp}; + +pub async fn get_local_app(registry: impl Into) -> anyhow::Result { + tracing_subscriber::fmt::init(); + + tracing::debug!("Starting client commit"); + + let app = SharedLocalApp::new(LocalApp::new(registry).await?); + + Ok(app) +}