Files
CodePilot/electron/updater.ts
T
7418andClaude Sonnet 4.6 5413eb55ba refactor: 简化 macOS 构建 — 只签名不公证,禁用原生热更新
CI (.github/workflows/build.yml):
- 删除 mac_notarize 输入、notarization strategy/credentials 步骤
- 双架构回归单步构建,统一 -c.mac.notarize=false
- 证书缺失时硬失败,不 fallback ad-hoc
- 上传产物移除 blockmap / latest-mac.yml
- release 收集资产移除 blockmap / yml 元数据

electron-builder.yml:
- mac.notarize 固定为 false

Electron 主进程 (main.ts):
- 移除 initAutoUpdater / setUpdaterWindow 调用和 import

Preload (preload.ts):
- 移除 updater bridge,不再暴露 electronAPI.updater

Updater (updater.ts):
- 恢复为 no-op stub

前端 AppShell 无需改动 — isNativeUpdater 运行时检测 updater 不存在,
自动走 /api/app/updates 浏览器模式(全量下载链接)。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 13:27:35 +08:00

20 lines
898 B
TypeScript

// =============================================================================
// Native auto-updater (electron-updater) — DISABLED
//
// macOS builds are signed with Developer ID but not notarized. Users update by
// downloading the latest DMG from GitHub Releases. The browser-mode update
// check (/api/app/updates) in the frontend notifies users of new versions.
// =============================================================================
import type { BrowserWindow } from 'electron';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function initAutoUpdater(_win: BrowserWindow) {
console.log('[updater] Native auto-updater is disabled. Users should download updates from GitHub Releases.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function setUpdaterWindow(_win: BrowserWindow) {
// no-op while native updater is disabled
}