How i can update my app using electron-forge with electron-release-server?
I deployed the implementation server and uploaded two assemblies .exe and.nupkg to it
and I'm trying to get these updates in the application according to the documentation
const url = `${server}download/latest`
autoUpdater.setFeedURL({ url })
setInterval(() => {
autoUpdater.checkForUpdates()
}, 10000)
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
const dialogOpts = {
type: 'info',
buttons: ['Restart', 'Later'],
title: 'Application Update',
message: process.platform === 'win32' ? releaseNotes : releaseName,
detail:
'A new version has been downloaded. Restart the application to apply the updates.',
}
dialog.showMessageBox(dialogOpts).then((returnValue) => {
if (returnValue.response === 0) autoUpdater.quitAndInstall()
})
})
but in development i get error:
There was a problem updating the application Error: Can not find Squirrel
If I understood correctly I can't use checkForUpdates()
in development
but in production build the update doesn't work either