From b4b22b9e2aa3236a8ce68dd6f3eb0956ab7ced3f Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sun, 6 Jan 2019 17:20:08 +0700 Subject: [PATCH] Comment out unused update functionality It was not working already and now it throws some weird error in latest `electron-builder`... --- MAINTAINING.md | 4 ++-- app/index.js | 39 +++++++++++++++++++-------------------- package.json | 10 ++-------- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/MAINTAINING.md b/MAINTAINING.md index 1d5d32c80d..7e69729392 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -31,9 +31,9 @@ If everything works fine, release it: $ yarn release ``` -Then edit the automatically created GitHub Releases draft and publish. +Then edit the automatically created GitHub Releases draft, remove the `*.blockmap` files, and publish. -Once the release is published you can automatically generate a signed checksum file with: +Once the release is published, you can automatically generate a signed checksum file with: ``` $ ./signedchecksum diff --git a/app/index.js b/app/index.js index 87c53d4313..5d3ae04555 100644 --- a/app/index.js +++ b/app/index.js @@ -9,7 +9,7 @@ require('strict-import')(module, { ], }); const electron = require('electron'); -const {autoUpdater} = require('electron-updater'); +/// const {autoUpdater} = require('electron-updater'); const {is, disableZoom, setContentSecurityPolicy} = require('electron-util'); const serve = require('electron-serve'); const logger = require('electron-timber'); @@ -48,25 +48,24 @@ app.commandLine.appendSwitch('disable-color-correct-rendering'); app.setAppUserModelId('com.lukechilds.hyperdex'); -if (!is.development) { - autoUpdater.logger = logger.log; - - autoUpdater.on('update-available', () => { - const notification = new electron.Notification({ - title: `${app.getName()} Update Available!`, - body: 'Click to view the latest version.', - }); - - notification.on('click', () => { - electron.shell.openExternal('https://github.com/atomiclabs/hyperdex/releases/latest'); - }); - - notification.show(); - }); - - autoUpdater.autoDownload = false; - autoUpdater.checkForUpdates(); -} +// TODO: Figure out why it throws at launch +/// if (!is.development) { +// autoUpdater.on('update-available', () => { +// const notification = new electron.Notification({ +// title: `${app.getName()} Update Available!`, +// body: 'Click to view the latest version.', +// }); +// +// notification.on('click', () => { +// electron.shell.openExternal('https://github.com/atomiclabs/hyperdex/releases/latest'); +// }); +// +// notification.show(); +// }); +// +// autoUpdater.autoDownload = false; +// autoUpdater.checkForUpdates(); +// } let mainWindow; diff --git a/package.json b/package.json index 522547d6d4..2923a01967 100644 --- a/package.json +++ b/package.json @@ -158,10 +158,8 @@ "appId": "com.lukechilds.hyperdex", "mac": { "category": "public.app-category.finance", - "electronUpdaterCompatibility": ">=2.15.0", - "extendInfo": { - "NSRequiresAquaSystemAppearance": false - } + "electronUpdaterCompatibility": ">=4", + "darkModeSupport": true }, "dmg": { "iconSize": 160, @@ -188,10 +186,6 @@ }, "nsis": { "createDesktopShortcut": "always" - }, - "publish": { - "provider": "github", - "publishAutoUpdate": false } } }