Skip to content

Commit

Permalink
Comment out unused update functionality
Browse files Browse the repository at this point in the history
It was not working already and now it throws some weird error in latest `electron-builder`...
  • Loading branch information
sindresorhus committed Jan 6, 2019
1 parent 7734ae0 commit b4b22b9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
4 changes: 2 additions & 2 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 19 additions & 20 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;

Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -188,10 +186,6 @@
},
"nsis": {
"createDesktopShortcut": "always"
},
"publish": {
"provider": "github",
"publishAutoUpdate": false
}
}
}

0 comments on commit b4b22b9

Please sign in to comment.