From a4b317e11dcfd803d53d31dd669352d5b720b836 Mon Sep 17 00:00:00 2001 From: zetaloop Date: Wed, 28 Aug 2024 15:25:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E6=9B=B4=E6=96=B0=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E6=8C=87=E5=90=91=E6=B1=89=E5=8C=96=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/dist-info.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/script/dist-info.ts b/script/dist-info.ts index 6c359b4477..2b1c6ff503 100644 --- a/script/dist-info.ts +++ b/script/dist-info.ts @@ -139,8 +139,17 @@ export function getUpdatesURL() { // original URL without architecture in it (which will still work for // compatibility reasons) in case anything goes wrong until we have everything // sorted out. - const architecturePath = getDistArchitecture() === 'arm64' ? 'arm64/' : '' - return `https://central.github.com/api/deployments/desktop/desktop/${architecturePath}latest?version=${version}&env=${getChannel()}` + // const architecturePath = getDistArchitecture() === 'arm64' ? 'arm64/' : '' + // return `https://central.github.com/api/deployments/desktop/desktop/${architecturePath}latest?version=${version}&env=${getChannel()}` + if (process.platform === 'win32') { + return `https://zetaloop.github.io/desktop-metadata/win32-${getDistArchitecture()}-${getChannel()}` + // example: https://zetaloop.github.io/desktop-metadata/win32-x64-production/RELEASES + } else if (process.platform === 'darwin') { + return `https://zetaloop.github.io/desktop-metadata/darwin-${getDistArchitecture()}-${getChannel()}/releases.json` + // example: https://zetaloop.github.io/desktop-metadata/darwin-arm64-production/releases.json + } else { + throw new Error(`No updates available for platform: ${process.platform}`) + } } export function shouldMakeDelta() {