fix: Mac desktop updater — platform-aware errors, HTTPS latest.json

Show Mac-specific update errors on macOS (not Windows message). Force HTTPS
bundle URLs, fix reconcile version from bundle filenames, bump to 0.1.4.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-14 12:19:19 +09:00
parent 6176c151a3
commit 6b9e88ca9f
6 changed files with 94 additions and 45 deletions
+10 -4
View File
@@ -19,7 +19,8 @@ function arg(name, fallback) {
const version = arg('--version', '0.1.0');
const dir = path.resolve(arg('--dir', 'dist-desktop/updates'));
const baseUrl = (arg('--base-url', 'https://exdev.co.kr/desktop/updates')).replace(/\/$/, '');
const rawBaseUrl = arg('--base-url', 'https://exdev.co.kr/desktop/updates');
const baseUrl = rawBaseUrl.replace(/\/$/, '').replace(/^http:\/\//i, 'https://');
const notes = arg('--notes', `GoldenChart Desktop ${version}`);
if (!fs.existsSync(dir)) {
@@ -82,13 +83,18 @@ for (const f of files) {
} else if (lower.endsWith('-setup.exe') || (lower.includes('setup') && lower.endsWith('.exe'))) {
addPlatform('windows-x86_64', f);
} else if (lower.endsWith('.app.tar.gz')) {
// universal mac fallback
if (!platforms['darwin-aarch64']) addPlatform('darwin-aarch64', f);
addPlatform('darwin-aarch64', f);
}
}
const bundleMaxVersion = Object.values(platforms).reduce(
(max, p) => (cmpSemver(p.bundleVersion, max) > 0 ? p.bundleVersion : max),
'0.0.0',
);
const manifestVersion = cmpSemver(bundleMaxVersion, version) > 0 ? bundleMaxVersion : version;
const manifest = {
version,
version: manifestVersion,
notes,
pub_date: new Date().toISOString(),
platforms: Object.fromEntries(