mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	Fixing beta updates [WIP] #269
This commit is contained in:
		@@ -1,14 +1,22 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
const {app, dialog} = require('electron');
 | 
			
		||||
const {autoUpdater} = require('electron-updater');
 | 
			
		||||
const isDev = require('electron-is-dev');
 | 
			
		||||
 | 
			
		||||
const ConfigUtil = require('./../renderer/js/utils/config-util.js');
 | 
			
		||||
 | 
			
		||||
function appUpdater() {
 | 
			
		||||
	// Don't initiate auto-updates in development and on Linux system
 | 
			
		||||
	// since autoUpdater doesn't work on Linux
 | 
			
		||||
	if (isDev || process.platform === 'linux') {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Log whats happening
 | 
			
		||||
	const log = require('electron-log');
 | 
			
		||||
	log.transports.file.level = 'info';
 | 
			
		||||
	autoUpdater.logger = log;
 | 
			
		||||
 | 
			
		||||
	// Handle auto updates for beta/pre releases
 | 
			
		||||
	autoUpdater.allowPrerelease = ConfigUtil.getConfigItem('betaUpdate') || false;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user