Add file_name argument

This commit is contained in:
Leonard Steppy 2024-12-12 12:07:07 +01:00
parent f41c061109
commit 44a83fe03b

View File

@ -42,12 +42,15 @@ enum Command {
/// How to handle older versions of the file
#[arg(short = 'a', long, default_value = "delete", default_missing_value = "archive", num_args = 0..1)]
old_version_policy: OldVersionPolicy,
/// The directory where to upload to
/// The directory where to upload to, relative to the server directory
#[arg(short = 'p', long, default_value = "plugins")]
upload_directory: PathBuf,
/// Skip the confirmation dialog
#[arg(long, default_value = "false", default_missing_value = "true", num_args = 0..1)]
no_confirm: bool,
/// The prefix of the name of older versions of the file, which should be replaced or deleted
#[arg(short, long)]
file_name: Option<String>,
},
/// Execute a command on the servers
#[command(visible_short_flag_alias = 'c')]
@ -95,6 +98,7 @@ fn main() -> Result<(), String> {
old_version_policy,
upload_directory,
no_confirm,
file_name,
} => {
todo!()
}