I'm trying to get my Electron Vue.js aplication to update itself when i release a new update in my Github Repro.
I'm packing my app using "electron-builder" and here is my package.json
I was following this guide but it didn't work.
This is the Code for the updater part which is located at the top of the src/main/index.js.
const { app, autoUpdater, dialog } = require('electron')
const server = "https://hazel.scarvite.now.sh/"
const feed = `${server}/update/${process.platform}/${app.getVersion()}`
autoUpdater.setFeedURL(feed)
setInterval(() => {
autoUpdater.checkForUpdates()
}, 60000)
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
const dialogOpts = {
type: 'info',
buttons: ['Restart', 'Not Now. On next Restart'],
title: 'Update',
message: process.platform === 'win32' ? releaseNotes : releaseName,
detail: 'A New Version has been Downloaded. Restart Now to Complete the Update.'
}
dialog.showMessageBox(dialogOpts).then((returnValue) => {
if (returnValue.response === 0) autoUpdater.quitAndInstall()
})
})
autoUpdater.on('error', message => {
console.error('There was a problem updating the application')
console.error(message)
})
I am Hoping that you guys can help me