Skip to content

Commit

Permalink
fix: Trigger deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Dec 6, 2024
1 parent 8731e4f commit 42e0841
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,35 @@ function updateAppAndQuit() {
if (import.meta.env.PROD) {
updater.autoUpdater.autoInstallOnAppQuit = true;
updater.autoUpdater.autoRunAppAfterInstall = false;

updater.autoUpdater.on('checking-for-update', () => {
log.info('[Main Window][AutoUpdater] Checking for updates');
});

updater.autoUpdater.on('update-available', _info => {
log.info('[Main Window][AutoUpdater] Update available');
});

updater.autoUpdater.on('update-not-available', _info => {
log.info('[Main Window][AutoUpdater] Update not available');
app.quit();
});

updater.autoUpdater.once('download-progress', _info => {
log.info('[Main Window][AutoUpdater] Downloading update');
});

updater.autoUpdater.on('update-downloaded', _info => {
log.info('[Main Window][AutoUpdater] Update downloaded');
const silent = getOSName() === PLATFORM.WINDOWS;
updater.autoUpdater.quitAndInstall(silent, false);
});

updater.autoUpdater.on('error', err => {
log.error('[Main Window][AutoUpdater] Error in auto-updater', err);
app.quit();
});

updater.autoUpdater.checkForUpdates();
} else {
app.quit();
Expand Down

0 comments on commit 42e0841

Please sign in to comment.