mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-15 23:18:39 +09:00
65 lines
2.2 KiB
Rust
65 lines
2.2 KiB
Rust
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
mod app_dev_server;
|
|
mod app_proxy;
|
|
mod app_wasm;
|
|
mod appimage;
|
|
mod calver;
|
|
mod ci_workflow;
|
|
mod common;
|
|
mod desktop;
|
|
mod desktop_native;
|
|
mod functions;
|
|
mod gateway;
|
|
mod image_set;
|
|
mod release;
|
|
mod schema;
|
|
|
|
use anyhow::Result;
|
|
use clap::{Parser, Subcommand};
|
|
|
|
#[derive(Debug, Parser)]
|
|
#[command(name = "fluxer-ci")]
|
|
struct Cli {
|
|
#[command(subcommand)]
|
|
command: Command,
|
|
}
|
|
|
|
#[derive(Debug, Subcommand)]
|
|
#[allow(clippy::large_enum_variant)]
|
|
enum Command {
|
|
AppDevServer(app_dev_server::AppDevServerArgs),
|
|
BuildAppWasm(app_wasm::BuildAppWasmArgs),
|
|
BuildAppProxy(app_proxy::BuildAppProxyArgs),
|
|
BuildMarkdownParserWasm(app_wasm::BuildMarkdownParserWasmArgs),
|
|
BuildDesktop(desktop::BuildDesktopArgs),
|
|
BuildDesktopNativeAddon(desktop_native::BuildDesktopNativeAddonArgs),
|
|
BuildGatewayNifs(gateway::BuildGatewayNifsArgs),
|
|
Ci(ci_workflow::CiArgs),
|
|
CleanSchemaGeneratedFiles(schema::CleanSchemaGeneratedFilesArgs),
|
|
Gateway(gateway::GatewayArgs),
|
|
ImageSet(image_set::ImageSetArgs),
|
|
Release(release::ReleaseArgs),
|
|
ResolveCalver(calver::ResolveCalverArgs),
|
|
}
|
|
|
|
pub async fn run() -> Result<()> {
|
|
match Cli::parse().command {
|
|
Command::AppDevServer(args) => app_dev_server::run(args).await,
|
|
Command::BuildAppWasm(args) => app_wasm::run_build_app_wasm(args),
|
|
Command::BuildAppProxy(args) => app_proxy::run(args).await,
|
|
Command::BuildMarkdownParserWasm(args) => app_wasm::run_build_markdown_parser_wasm(args),
|
|
Command::BuildDesktop(args) => desktop::run(args).await,
|
|
Command::BuildDesktopNativeAddon(args) => {
|
|
desktop_native::run_build_desktop_native_addon(args)
|
|
}
|
|
Command::BuildGatewayNifs(args) => gateway::run_build_gateway_nifs(args),
|
|
Command::Ci(args) => ci_workflow::run_ci(args).await,
|
|
Command::CleanSchemaGeneratedFiles(args) => schema::run_clean_generated_files(args),
|
|
Command::Gateway(args) => gateway::run_gateway(args),
|
|
Command::ImageSet(args) => image_set::run(args),
|
|
Command::Release(args) => release::run(args).await,
|
|
Command::ResolveCalver(args) => calver::run(args),
|
|
}
|
|
}
|