From e7aa75cebb6c40fe07e5bc5b1d8d130177839106 Mon Sep 17 00:00:00 2001 From: Ritesh Raj Sarraf Date: Mon, 16 Sep 2024 20:40:11 +0530 Subject: [PATCH] make option --arch optional Having it optional makes it convenient to be used in other routines Signed-off-by: Ritesh Raj Sarraf --- src/handler.rs | 2 +- src/pipeline.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/handler.rs b/src/handler.rs index dcf4c6a..122216f 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -120,7 +120,7 @@ struct DownloadBinariesAction { package: String, #[clap(long)] repository: String, - #[clap(long)] + #[clap(long, required=false)] arch: String, #[clap(long)] build_results_dir: Utf8PathBuf, diff --git a/src/pipeline.rs b/src/pipeline.rs index 247cede..844510e 100644 --- a/src/pipeline.rs +++ b/src/pipeline.rs @@ -78,7 +78,6 @@ pub fn generate_monitor_pipeline( ("project", project.to_owned()), ("package", package.to_owned()), ("repository", repo.to_owned()), - ("arch", arch.to_owned()), ]; let mut monitor_args = vec![ @@ -96,7 +95,9 @@ pub fn generate_monitor_pipeline( if let PipelineDownloadBinaries::OnSuccess { build_results_dir } = &options.download_binaries { - let mut download_args = vec![("build-results-dir", build_results_dir.clone())]; + let mut download_args = vec![("build-results-dir", build_results_dir.clone()), + ("arch", arch.to_owned()), + ]; download_args.extend_from_slice(&common_args); script.push(generate_command( "download-binaries".to_owned(),