david 7d75524a8c Removing IDE files and adding them to .gitignore
Upgrade to Rust 2021

- 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

Documentation Update for Cache Location on macOS
Documentation Update for next version of warp-pack and new url for java
Adding support for aarch64 build and needed apple-darwin build options
Using cargo update to get 'newest' dependencies version
Updating warp-packer recursive
First draft of BUILD.md
Fixing several typos in BUILD.md and adding INSTALL.md
Adding section of changes in README.md
Fixing anchor of new section
Fixing typo in README.md
Adding CHANGELOG.md to project
Adding additional information to CHANGELOG.md
Fixing wrong links
Updating information from origin repository
Cleaning up CHANGELOG.md
Updating CHANGELOG.md
Updating version and authors
Fixing links in CHANGELOG.md
Updating CHANGELOG.md for GitHub
2024-05-18 23:31:32 +02:00

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,
}