Skip to content

Commit

Permalink
publish
Browse files Browse the repository at this point in the history
  • Loading branch information
quinn committed Mar 11, 2024
1 parent beb01d8 commit 1c587ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
21 changes: 0 additions & 21 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,6 @@ async function createWindow() {
autoUpdater.logger.transports.file.level = 'info'

await autoUpdater.checkForUpdatesAndNotify()
await autoUpdater.downloadUpdate()

autoUpdater.on('update-available', () => {})
autoUpdater.on('update-downloaded', () => {
if (!win) return

dialog
.showMessageBox(win, {
type: 'question',
buttons: ['Install and Restart', 'Later'],
defaultId: 0,
message:
'A new update has been downloaded. Would you like to install and restart the app now?',
})
.then((result) => {
if (result.response === 0) {
autoUpdater.quitAndInstall()
}
})
.catch(console.error)
})
}

// This method will be called when Electron has finished
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"scripts": {
"build": "vite build",
"publish": "npx electron-builder --publish always",
"dev": "vite",
"format": "prettier --write .",
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
Expand Down

0 comments on commit 1c587ca

Please sign in to comment.