From c95d5df6d481d37a083efce75602e575fc5f72b9 Mon Sep 17 00:00:00 2001 From: Tlntin Date: Wed, 3 May 2023 11:04:43 +0800 Subject: [PATCH] fixup target of 'all' can't be recognize in pake-cli --- bin/builders/common.ts | 8 ++++++-- dist/cli.js | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bin/builders/common.ts b/bin/builders/common.ts index 28470e3..93fd3ce 100644 --- a/bin/builders/common.ts +++ b/bin/builders/common.ts @@ -175,7 +175,11 @@ export async function mergeTauriConfig( if (process.platform === "linux") { delete tauriConf.tauri.bundle.deb.files; if (["all", "deb", "appimage"].includes(options.targets)) { - tauriConf.tauri.bundle.targets = [options.targets]; + if (options.targets === "all") { + tauriConf.tauri.bundle.targets = ["deb", "appimage"]; + } else { + tauriConf.tauri.bundle.targets = [options.targets]; + } } else { logger.warn("targets must be 'all', 'deb', 'appimage', we will use default 'all'"); } @@ -279,7 +283,7 @@ export async function mergeTauriConfig( break; } } - + let bundleConf = {tauri: {bundle: tauriConf.tauri.bundle}}; await fs.writeFile( configPath, diff --git a/dist/cli.js b/dist/cli.js index 36a809d..2542313 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -1767,7 +1767,12 @@ function mergeTauriConfig(url, options, tauriConf) { if (process.platform === "linux") { delete tauriConf.tauri.bundle.deb.files; if (["all", "deb", "appimage"].includes(options.targets)) { - tauriConf.tauri.bundle.targets = [options.targets]; + if (options.targets === "all") { + tauriConf.tauri.bundle.targets = ["deb", "appimage"]; + } + else { + tauriConf.tauri.bundle.targets = [options.targets]; + } } else { logger.warn("targets must be 'all', 'deb', 'appimage', we will use default 'all'");