fix(release): keep the updater configuration in the installer
Some checks failed
deploy-site / deploy (push) Failing after 1m6s

Installing the previous build left an app that could not update itself: the
packaging path used to guarantee the native module build does not create the
updater configuration file, so the update client had nothing to read.

That file is now written from the single feed source and its presence in the
packaged app is checked before anything is published, so an installer that
cannot update can no longer be released.
This commit is contained in:
Yun Chan 2026-09-18 16:35:03 +09:00
parent 1af3cf75c7
commit f14341ace4
28 changed files with 141 additions and 47 deletions

View file

@ -70,6 +70,9 @@ if (build) {
runNodeScript('scripts/ci/fix-native-abi.mjs', ['--dir', appDir])
runNodeScript('scripts/ci/verify-native-abi.mjs', ['--dir', appDir])
// electron-updater 설정 파일을 보장한다(없으면 자동 업데이트가 동작하지 않는다)
runNodeScript('scripts/ci/write-app-update-yml.mjs', ['--dir', appDir])
// 3) 검증된 트리에서 설치본 생성 (--prepackaged = 재빌드 없이 그대로 패키징)
console.log('[updater] electron-builder --prepackaged (NSIS x64)')
const packageResult = spawnSync(
@ -157,6 +160,13 @@ if (installerSize > MAX_UPLOAD_BYTES) {
process.exit(1)
}
// 설치본에 app-update.yml이 없으면 electron-updater가 설정을 읽지 못해 자동 업데이트가 죽는다.
const packagedUpdateConfig = join(releaseDir, 'win-unpacked', 'resources', 'app-update.yml')
if (!existsSync(packagedUpdateConfig)) {
console.error('[updater] app-update.yml 누락 — write-app-update-yml.mjs를 먼저 실행하세요.')
process.exit(1)
}
const metadata = readFileSync(metadataPath, 'utf8')
if (!metadata.includes(`version: ${version}`)) {
console.error('[updater] latest.yml의 버전이 product-version.json과 다릅니다.')