Skip to content

Commit a03f406

Browse files
authored
Merge pull request #255 from hypermodules/auto-update-events
Add auto updater events
2 parents 875e334 + 52a19a2 commit a03f406

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

main/index.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,38 @@ app.on('ready', function appReady () {
217217
}, 500)
218218
})
219219

220+
autoUpdater.on('error', (err) => {
221+
console.log(err)
222+
})
223+
224+
autoUpdater.on('checking-for-update', () => {
225+
console.log('autoUpdater: Checking for update...')
226+
})
227+
228+
autoUpdater.on('update-available', (info) => {
229+
console.log(`autoUpdater: Update available!`)
230+
console.log(info)
231+
})
232+
233+
autoUpdater.on('update-not-available', (info) => {
234+
console.log(`autoUpdater: No update available`)
235+
console.log(info)
236+
})
237+
238+
autoUpdater.on('update-not-available', (info) => {
239+
console.log(`autoUpdater: No update available`)
240+
console.log(info)
241+
})
242+
243+
autoUpdater.on('download-progress', (progress) => {
244+
console.log(progress)
245+
})
246+
247+
autoUpdater.on('update-downloaded', (info) => {
248+
console.log(`autoUpdater: Update downloaded`)
249+
console.log(info)
250+
})
251+
220252
app.on('window-all-closed', function allWindowsClosed () {
221253
if (process.platform !== 'darwin') app.quit()
222254
})

0 commit comments

Comments
 (0)