Electron App Update Notifier
Notify user about new app updates by fetching release from Github repository.
Motivation
update-electron-app is an auto updating solution for open source
Electron apps. It is awesome but has some limitations:
- It does not support Linux currently
- Applications on macOS must be signed in order to work.
This package comes to help in these cases. Instead of downloading installer automatically, it simply notifies user to go
to GitHub release page when updates available.
Installation
npm install electron-update-notifier
Usage
Auto check for updates on app start
const {app} = require('electron');
const {setUpdateNotification} = require('electron-update-notifier');
app.whenReady().then(() => {
setUpdateNotification({
repository: 'user/repo',
token: '',
debug: false,
silent: true
})
})
Check for updates manually
const {checkForUpdates} = require('electron-update-notifier');
checkForUpdates({
silent: false,
})
Use it with update-electron-app:
switch (process.platform) {
case 'darwin':
case 'win32':
require('update-electron-app')()
break
default:
require('electron-update-notifier').setUpdateNotification({
})
}
Acknowledgements
@pd4d10 for original work
License
MIT License