tauri/tooling/cli/src/signer.rs
2022-08-28 15:13:21 -03:00

37 lines
719 B
Rust

// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use crate::Result;
use clap::{Parser, Subcommand};
mod generate;
mod sign;
#[derive(Parser)]
#[clap(
author,
version,
about = "Tauri updater signer",
subcommand_required(true),
arg_required_else_help(true)
)]
pub struct Cli {
#[clap(subcommand)]
command: Commands,
}
#[derive(Subcommand)]
enum Commands {
Sign(sign::Options),
Generate(generate::Options),
}
pub fn command(cli: Cli) -> Result<()> {
match cli.command {
Commands::Sign(options) => sign::command(options)?,
Commands::Generate(options) => generate::command(options)?,
}
Ok(())
}