removed autoupdate for beta "testing"

RebeccaBranch
David Tookey 5 years ago
parent 25022a8cc6
commit b274906076

@ -5,40 +5,38 @@ require('update-electron-app')({
const updateCheckInterval = 1000 * 60
const path = require('path')
const {app, BrowserWindow, autoUpdater} = require('electron')
const {app, BrowserWindow} = require('electron')
const server = 'https://update.jdsconsulting.net'
const url = `${server}/update/${process.platform}/${app.getVersion()}`
autoUpdater.setFeedURL({url})
autoUpdater.checkForUpdates();
setInterval(() => {
console.log("Checking for update...");
autoUpdater.checkForUpdates();
}, updateCheckInterval)
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
console.log("Handling updates...")
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()
})
})
autoUpdater.on('error', message => {
console.error('There was a problem updating the application')
console.error(message)
})
// autoUpdater.setFeedURL({url})
//
// autoUpdater.checkForUpdates();
// setInterval(() => {
// console.log("Checking for update...");
// autoUpdater.checkForUpdates();
// }, updateCheckInterval)
//
// autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
// console.log("Handling updates...")
// 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()
// })
// })
//
// autoUpdater.on('error', message => {
// console.error('There was a problem updating the application')
// console.error(message)
// })
const debug = /--debug/.test(process.argv[2])

Loading…
Cancel
Save