chore: fix updater script

This commit is contained in:
GyDi 2022-07-18 12:55:59 +08:00 committed by GitHub
parent 9b56233938
commit 7633f9f88b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,18 +53,12 @@ async function resolveUpdater() {
const { name, browser_download_url } = asset; const { name, browser_download_url } = asset;
// win64 url // win64 url
if ( if (name.endsWith(".msi.zip") && name.includes("en-US")) {
name.endsWith(".msi.zip") &&
(!updateData.platforms.win64.url || name.includes("en-US"))
) {
updateData.platforms.win64.url = browser_download_url; updateData.platforms.win64.url = browser_download_url;
updateData.platforms["windows-x86_64"].url = browser_download_url; updateData.platforms["windows-x86_64"].url = browser_download_url;
} }
// win64 signature // win64 signature
if ( if (name.endsWith(".msi.zip.sig") && name.includes("en-US")) {
name.endsWith(".msi.zip.sig") &&
(!updateData.platforms.win64.signature || name.includes("en-US"))
) {
const sig = await getSignature(browser_download_url); const sig = await getSignature(browser_download_url);
updateData.platforms.win64.signature = sig; updateData.platforms.win64.signature = sig;
updateData.platforms["windows-x86_64"].signature = sig; updateData.platforms["windows-x86_64"].signature = sig;