mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-03 21:43:18 +00:00
log whats happening in auto-updater
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
'use strict';
|
||||
const os = require('os');
|
||||
// const os = require('os');
|
||||
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
|
||||
//const version = app.getVersion();
|
||||
//const platform = os.platform() + '_' + os.arch(); // usually returns darwin_64
|
||||
//const updaterFeedURL = 'http://zulipdesktop.herokuapp.com/update/' + platform + '/' + version;
|
||||
// const version = app.getVersion();
|
||||
// const platform = os.platform() + '_' + os.arch(); // usually returns darwin_64
|
||||
// const updaterFeedURL = 'http://zulipdesktop.herokuapp.com/update/' + platform + '/' + version;
|
||||
|
||||
function appUpdater() {
|
||||
//autoUpdater.setFeedURL(updaterFeedURL);
|
||||
// autoUpdater.setFeedURL(updaterFeedURL);
|
||||
|
||||
// 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
|
||||
// it could console log in developer tools
|
||||
/*
|
||||
autoUpdater.on('error', err => console.log(err));
|
||||
autoUpdater.on('checking-for-update', () => console.log('checking-for-update'));
|
||||
autoUpdater.on('update-available', () => console.log('update-available'));
|
||||
autoUpdater.on('update-not-available', () => console.log('update-not-available'));
|
||||
*/
|
||||
|
||||
// Ask the user if update is available
|
||||
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
|
||||
|
||||
Reference in New Issue
Block a user