tauri/tooling/cli/src/signer.rs

37 lines
719 B
Rust
Raw Normal View History

2022-08-28 21:13:21 +03:00
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use crate::Result;
2022-02-27 23:35:43 +03:00
use clap::{Parser, Subcommand};
mod generate;
mod sign;
#[derive(Parser)]
2022-02-27 23:35:43 +03:00
#[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(())
}