Skip to content

Commit

Permalink
Some more smaller auto update thigns..
Browse files Browse the repository at this point in the history
  • Loading branch information
Makisuo committed Feb 7, 2021
1 parent e3c48f5 commit 706c1fa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 19 additions & 3 deletions main/autoUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,33 @@ const updaterFeedURL =
version

export function appUpdater() {
console.log(updaterFeedURL)
autoUpdater.setFeedURL(updaterFeedURL)

/* Log whats happening
TODO send autoUpdater events to renderer so that we could console log it in developer tools
You could alsoe use nslog or other logging to see what's happening */
autoUpdater.on('error', (err) => console.log(err))
autoUpdater.on('checking-for-update', () =>
console.log('checking-for-update')
dialog.showMessageBox({
type: 'info',
title: 'Checking for updates',
})
)
autoUpdater.on('update-available', () =>
dialog.showMessageBox(
{
type: 'info',
title: 'Found Updates',
message: 'Found updates, do you want update now?',
buttons: ['Sure', 'No'],
},
(buttonIndex) => {
if (buttonIndex === 0) {
autoUpdater.downloadUpdate()
}
}
)
)
autoUpdater.on('update-available', () => console.log('update-available'))
autoUpdater.on('update-not-available', () =>
console.log('update-not-available')
)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "league-utils",
"description": "League Utils",
"version": "0.2.7",
"version": "0.2.8",
"author": "David Granzin <[email protected]>",
"main": "app/background.js",
"scripts": {
Expand Down

0 comments on commit 706c1fa

Please sign in to comment.