Skip to content

Commit 0c4700e

Browse files
authored
fix(cli): Remove mention of updater bundle arg in help output (#12985)
* fix(cli): Remove mention of `updater` bundle arg in help output * allow --bundles updater but hide from help
1 parent b839212 commit 0c4700e

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

.changes/cli-bundles-updater.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
tauri-cli: "patch:bug"
3+
"@tauri-apps/cli": "patch:bug"
4+
---
5+
6+
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`.

crates/tauri-cli/src/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ pub struct Options {
4040
#[clap(short, long, action = ArgAction::Append, num_args(0..))]
4141
pub features: Option<Vec<String>>,
4242
/// Space or comma separated list of bundles to package.
43-
///
44-
/// Note that the `updater` bundle is not automatically added so you must specify it if the updater is enabled.
4543
#[clap(short, long, action = ArgAction::Append, num_args(0..), value_delimiter = ',')]
4644
pub bundles: Option<Vec<BundleFormat>>,
4745
/// Skip the bundling step even if `bundle > active` is `true` in tauri config.

crates/tauri-cli/src/bundle.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,12 @@ impl FromStr for BundleFormat {
3939
impl ValueEnum for BundleFormat {
4040
fn value_variants<'a>() -> &'a [Self] {
4141
static VARIANTS: OnceLock<Vec<BundleFormat>> = OnceLock::new();
42-
VARIANTS.get_or_init(|| {
43-
PackageType::all()
44-
.iter()
45-
.filter(|t| **t != PackageType::Updater)
46-
.map(|t| Self(*t))
47-
.collect()
48-
})
42+
VARIANTS.get_or_init(|| PackageType::all().iter().map(|t| Self(*t)).collect())
4943
}
5044

5145
fn to_possible_value(&self) -> Option<PossibleValue> {
52-
Some(PossibleValue::new(self.0.short_name()))
46+
let hide = self.0 == PackageType::Updater;
47+
Some(PossibleValue::new(self.0.short_name()).hide(hide))
5348
}
5449
}
5550

@@ -63,8 +58,6 @@ pub struct Options {
6358
#[clap(short, long)]
6459
pub debug: bool,
6560
/// Space or comma separated list of bundles to package.
66-
///
67-
/// Note that the `updater` bundle is not automatically added so you must specify it if the updater is enabled.
6861
#[clap(short, long, action = ArgAction::Append, num_args(0..), value_delimiter = ',')]
6962
pub bundles: Option<Vec<BundleFormat>>,
7063
/// JSON strings or path to JSON files to merge with the default configuration file

0 commit comments

Comments
 (0)