update pake-cli to 1.2.9

This commit is contained in:
Tlntin
2023-03-18 13:33:10 +08:00
parent c1b86a715c
commit a8a2c01586
6 changed files with 26 additions and 21 deletions

View File

@@ -63,6 +63,14 @@ export async function mergeTauriConfig(
const exists = await fs.stat(options.icon)
.then(() => true)
.catch(() => false);
if (process.platform === "linux") {
if (["all", "deb", "appimage"].includes(options.targets)) {
tauriConf.tauri.bundle.targets = [options.targets];
} else {
logger.warn("targets must be 'all', 'deb', 'appimage', we will use default 'all'");
}
}
if (exists) {
let updateIconPath = true;
let customIconExt = path.extname(options.icon).toLowerCase();
@@ -82,11 +90,6 @@ export async function mergeTauriConfig(
updateIconPath = false;
logger.warn(`icon file in Linux must be 512 * 512 pix with .png type, but you give ${customIconExt}`);
}
if (["all", "deb", "appimage"].includes(options.targets)) {
tauriConf.tauri.bundle.targets = [options.targets];
} else {
logger.warn("targets must be 'all', 'deb', 'appimage', we will use default 'all'");
}
}
if (process.platform === "darwin" && customIconExt !== ".icns") {