Skip to content

Commit

Permalink
fix: new aproach for auto-updates
Browse files Browse the repository at this point in the history
the old one was not working for alpha/beta releases
  • Loading branch information
Xiphe committed Aug 18, 2020
1 parent e1e26cf commit f667c79
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 47 deletions.
6 changes: 4 additions & 2 deletions main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ import { createDefaultMenu } from './defaultMenu';
import registerSave from './registerSave';
import moneymoneyHandlers from './moneymoney/handlers';
import getSettings from '../src/shared/settings';
import startUpdater from 'update-electron-app';
import { autoUpdater } from 'electron-updater';

autoUpdater.channel = 'alpha';

export default function main() {
/* ref https://github.com/Xiphe/budgetbudget/issues/12 */
app.allowRendererProcessReuse = true;

disableUnused(app);
(startUpdater as any)();
autoUpdater.checkForUpdatesAndNotify();

const settings = getSettings();
const windowManager = createWindowManager(app, ipcMain, settings);
Expand Down
99 changes: 56 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"directories": {
"buildResources": "assets"
},
"generateUpdatesFilesForAllChannels": true,
"afterSign": "electron-builder-notarize"
},
"release": {
Expand Down Expand Up @@ -75,6 +76,7 @@
"classnames": "2.2.6",
"date-fns": "2.15.0",
"electron-settings": "3.2.0",
"electron-updater": "4.3.4",
"focus-visible": "5.1.0",
"fp-ts": "2.8.1",
"io-ts": "2.2.9",
Expand All @@ -84,8 +86,7 @@
"plist": "3.0.1",
"react": "0.0.0-experimental-94c0244ba",
"react-dom": "0.0.0-experimental-94c0244ba",
"recoil": "0.0.10",
"update-electron-app": "1.5.0"
"recoil": "0.0.10"
},
"devDependencies": {
"@craco/craco": "5.6.4",
Expand Down

0 comments on commit f667c79

Please sign in to comment.