mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-04 14:03:27 +00:00
log whats happening in auto-updater
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const os = require('os');
|
// const os = require('os');
|
||||||
const {app, dialog} = require('electron');
|
const {app, dialog} = require('electron');
|
||||||
const {autoUpdater} = require("electron-updater").autoUpdater;
|
const {autoUpdater} = require('electron-updater').autoUpdater;
|
||||||
|
|
||||||
// We don't need to call all of these since it's automatically handled by electron-updater
|
// We don't need to call all of these since it's automatically handled by electron-updater
|
||||||
// const version = app.getVersion();
|
// const version = app.getVersion();
|
||||||
@@ -12,12 +12,17 @@ function appUpdater() {
|
|||||||
// autoUpdater.setFeedURL(updaterFeedURL);
|
// autoUpdater.setFeedURL(updaterFeedURL);
|
||||||
|
|
||||||
// Log whats happening
|
// Log whats happening
|
||||||
|
const log = require('electron-log');
|
||||||
|
log.transports.file.level = 'info';
|
||||||
|
autoUpdater.logger = log;
|
||||||
// TODO send autoUpdater events to renderer so that we could
|
// TODO send autoUpdater events to renderer so that we could
|
||||||
// it could console log in developer tools
|
// it could console log in developer tools
|
||||||
|
/*
|
||||||
autoUpdater.on('error', err => console.log(err));
|
autoUpdater.on('error', err => console.log(err));
|
||||||
autoUpdater.on('checking-for-update', () => console.log('checking-for-update'));
|
autoUpdater.on('checking-for-update', () => console.log('checking-for-update'));
|
||||||
autoUpdater.on('update-available', () => console.log('update-available'));
|
autoUpdater.on('update-available', () => console.log('update-available'));
|
||||||
autoUpdater.on('update-not-available', () => console.log('update-not-available'));
|
autoUpdater.on('update-not-available', () => console.log('update-not-available'));
|
||||||
|
*/
|
||||||
|
|
||||||
// Ask the user if update is available
|
// Ask the user if update is available
|
||||||
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
|
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-is-dev": "0.1.2",
|
"electron-is-dev": "0.1.2",
|
||||||
"electron-updater": "1.2.0",
|
"electron-updater": "1.2.0",
|
||||||
|
"electron-log": "1.3.0",
|
||||||
"configstore": "2.1.0",
|
"configstore": "2.1.0",
|
||||||
"dialogs": "1.1.14",
|
"dialogs": "1.1.14",
|
||||||
"electron-debug": "1.1.0",
|
"electron-debug": "1.1.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user