From fa742a997007eea4bbd59362b70f7acc76d4f728 Mon Sep 17 00:00:00 2001 From: FabianLars Date: Sat, 15 Mar 2025 11:15:50 +0100 Subject: [PATCH 1/2] fix(cli): Remove mention of `updater` bundle arg in help output --- crates/tauri-cli/src/build.rs | 2 -- crates/tauri-cli/src/bundle.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/crates/tauri-cli/src/build.rs b/crates/tauri-cli/src/build.rs index 6f905b951bc0..631c87a181ac 100644 --- a/crates/tauri-cli/src/build.rs +++ b/crates/tauri-cli/src/build.rs @@ -40,8 +40,6 @@ pub struct Options { #[clap(short, long, action = ArgAction::Append, num_args(0..))] pub features: Option>, /// Space or comma separated list of bundles to package. - /// - /// Note that the `updater` bundle is not automatically added so you must specify it if the updater is enabled. #[clap(short, long, action = ArgAction::Append, num_args(0..), value_delimiter = ',')] pub bundles: Option>, /// Skip the bundling step even if `bundle > active` is `true` in tauri config. diff --git a/crates/tauri-cli/src/bundle.rs b/crates/tauri-cli/src/bundle.rs index 4d1b6e58140c..aee882919125 100644 --- a/crates/tauri-cli/src/bundle.rs +++ b/crates/tauri-cli/src/bundle.rs @@ -63,8 +63,6 @@ pub struct Options { #[clap(short, long)] pub debug: bool, /// Space or comma separated list of bundles to package. - /// - /// Note that the `updater` bundle is not automatically added so you must specify it if the updater is enabled. #[clap(short, long, action = ArgAction::Append, num_args(0..), value_delimiter = ',')] pub bundles: Option>, /// JSON strings or path to JSON files to merge with the default configuration file From 1e070a93bc4a98155885dfdbb07a82eb18155467 Mon Sep 17 00:00:00 2001 From: FabianLars Date: Sat, 15 Mar 2025 11:40:13 +0100 Subject: [PATCH 2/2] allow --bundles updater but hide from help --- .changes/cli-bundles-updater.md | 6 ++++++ crates/tauri-cli/src/bundle.rs | 11 +++-------- 2 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .changes/cli-bundles-updater.md diff --git a/.changes/cli-bundles-updater.md b/.changes/cli-bundles-updater.md new file mode 100644 index 000000000000..3cbf8e73098b --- /dev/null +++ b/.changes/cli-bundles-updater.md @@ -0,0 +1,6 @@ +--- +tauri-cli: "patch:bug" +"@tauri-apps/cli": "patch:bug" +--- + +The cli will now accept `--bundles updater` again. It's still no-op as it has been for all v2 versions. If you want to build updater artifacts, enable `createUpdaterArtifacts` in `tauri.conf.json`. diff --git a/crates/tauri-cli/src/bundle.rs b/crates/tauri-cli/src/bundle.rs index aee882919125..53fd1e6d67c7 100644 --- a/crates/tauri-cli/src/bundle.rs +++ b/crates/tauri-cli/src/bundle.rs @@ -39,17 +39,12 @@ impl FromStr for BundleFormat { impl ValueEnum for BundleFormat { fn value_variants<'a>() -> &'a [Self] { static VARIANTS: OnceLock> = OnceLock::new(); - VARIANTS.get_or_init(|| { - PackageType::all() - .iter() - .filter(|t| **t != PackageType::Updater) - .map(|t| Self(*t)) - .collect() - }) + VARIANTS.get_or_init(|| PackageType::all().iter().map(|t| Self(*t)).collect()) } fn to_possible_value(&self) -> Option { - Some(PossibleValue::new(self.0.short_name())) + let hide = self.0 == PackageType::Updater; + Some(PossibleValue::new(self.0.short_name()).hide(hide)) } }