d9aeb582a2
- Fix lints - Formatting pass - Add Cargo.lock Use anyhow to improve error handling Fix errors during directory removal in Windows Update dependencies Switch linux build to musl Switch to musl Set version to 0.4.0 Allow using uid instead of mtime Remove name duplication with runner map Fixing typo
48 lines
1.2 KiB
Rust
48 lines
1.2 KiB
Rust
use std::path::PathBuf;
|
|
|
|
use clap::{Args, Parser, Subcommand};
|
|
|
|
#[derive(Parser, Debug)]
|
|
#[command(author, version, about)]
|
|
pub struct Cli {
|
|
#[command(subcommand)]
|
|
pub command: Command,
|
|
}
|
|
|
|
#[derive(Subcommand, Debug)]
|
|
pub enum Command {
|
|
Pack(PackArgs),
|
|
List,
|
|
}
|
|
|
|
#[derive(Args, Debug)]
|
|
pub struct PackArgs {
|
|
/// Sets the architecture. Use list subcommand to get possible options.
|
|
#[arg(short, long)]
|
|
pub arch: String,
|
|
|
|
/// Sets the input directory containing the application and dependencies
|
|
#[arg(short, long)]
|
|
pub input_dir: PathBuf,
|
|
|
|
/// Sets the application executable file name
|
|
#[arg(short, long)]
|
|
pub exec: PathBuf,
|
|
|
|
/// Sets the resulting self-contained application file name
|
|
#[arg(short, long)]
|
|
pub output: PathBuf,
|
|
|
|
/// Generate unique id for each package build
|
|
#[arg(short = 'q', long, default_value_t = false)]
|
|
pub unique_id: bool,
|
|
|
|
/// Prefix to use instead of single-file executable name
|
|
#[arg(short, long)]
|
|
pub prefix: Option<PathBuf>,
|
|
|
|
/// When using unique-id, do not look for and clean obsolete versions with the same prefix from cache
|
|
#[arg(short = 'n', long = "no-clean", action = clap::ArgAction::SetFalse)]
|
|
pub clean: bool,
|
|
}
|