From 3b5993652f7ff9f3e9a274da3e90e276f3d646f9 Mon Sep 17 00:00:00 2001 From: GyDi Date: Thu, 2 Jun 2022 00:56:05 +0800 Subject: [PATCH] chore: portable script --- scripts/portable.mjs | 1 + scripts/updater.mjs | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/portable.mjs b/scripts/portable.mjs index 1d1338b..08796e6 100644 --- a/scripts/portable.mjs +++ b/scripts/portable.mjs @@ -21,6 +21,7 @@ async function resolvePortable() { zip.addLocalFile(path.join(releaseDir, "Clash Verge.exe")); zip.addLocalFile(path.join(releaseDir, "clash.exe")); + zip.addLocalFile(path.join(releaseDir, "clash-meta.exe")); zip.addLocalFolder(path.join(releaseDir, "resources"), "resources"); const require = createRequire(import.meta.url); diff --git a/scripts/updater.mjs b/scripts/updater.mjs index 32eaf20..a617121 100644 --- a/scripts/updater.mjs +++ b/scripts/updater.mjs @@ -53,12 +53,18 @@ async function resolveUpdater() { const { name, browser_download_url } = asset; // win64 url - if (name.endsWith(".msi.zip") && (!updateData.platforms.win64.url || name.includes('en-US'))) { + if ( + name.endsWith(".msi.zip") && + (!updateData.platforms.win64.url || name.includes("en-US")) + ) { updateData.platforms.win64.url = browser_download_url; updateData.platforms["windows-x86_64"].url = browser_download_url; } // win64 signature - if (name.endsWith(".msi.zip.sig") && (!updateData.platforms.win64.signature || name.includes('en-US'))) { + if ( + name.endsWith(".msi.zip.sig") && + (!updateData.platforms.win64.signature || name.includes("en-US")) + ) { const sig = await getSignature(browser_download_url); updateData.platforms.win64.signature = sig; updateData.platforms["windows-x86_64"].signature = sig;