Files
gt-tool/src/cli.rs
Robert Garrett 340b37cf05 Disable the unimplemented "create" arg for uploads
I never got around to implementing the create-and-upload behavior for
the file attachment command. I'll do it later, but for now I'm disabling
the code to quiet down the compiler warnings.
2025-06-01 20:44:56 -05:00

40 lines
917 B
Rust

use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(version, about, long_about = None)]
pub struct Args {
#[arg(short = 'u', long = "url", env = "GTTOOL_GITEA_URL")]
pub gitea_url: String,
#[arg(short = 'r', long = "repo", env = "GTTOOL_FQRN")]
pub repo: String,
#[command(subcommand)]
pub command: Commands,
}
#[derive(Debug, Subcommand)]
pub enum Commands {
ListReleases,
CreateRelease {
#[arg()]
body: String,
#[arg(short, long)]
draft: bool,
#[arg()]
name: String,
#[arg()]
tag_name: String,
#[arg()]
target_commitish: String,
},
UploadRelease {
#[arg()]
tag_name: String,
// TODO: implement create-and-upload as a single command invocation
// #[arg(short, long)]
// create: bool,
#[arg()]
files: Vec<String>,
},
}