mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Added config switch for update channel (#2101)
This commit is contained in:
parent
c16a145253
commit
a0713f86e8
2 changed files with 12 additions and 2 deletions
|
|
@ -1,11 +1,13 @@
|
|||
// Packages
|
||||
const {autoUpdater} = require('electron');
|
||||
const ms = require('ms');
|
||||
|
||||
// Utilities
|
||||
const notify = require('./notify'); // eslint-disable-line no-unused-vars
|
||||
const {version} = require('./package');
|
||||
const {getConfig} = require('./config');
|
||||
|
||||
const {platform} = process;
|
||||
const FEED_URL = `https://releases.hyper.is/update/${platform}`;
|
||||
|
||||
let isInit = false;
|
||||
|
||||
|
|
@ -14,7 +16,11 @@ function init() {
|
|||
console.error('Error fetching updates', msg + ' (' + err.stack + ')');
|
||||
});
|
||||
|
||||
autoUpdater.setFeedURL(`${FEED_URL}/${version}`);
|
||||
const config = getConfig();
|
||||
const updatePrefix = config.canaryUpdates ? 'releases-canary' : 'releases';
|
||||
const feedURL = `https://${updatePrefix}.hyper.is/update/${platform}`;
|
||||
|
||||
autoUpdater.setFeedURL(`${feedURL}/${version}`);
|
||||
|
||||
setTimeout(() => {
|
||||
autoUpdater.checkForUpdates();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
module.exports = {
|
||||
config: {
|
||||
// Choose either `false` for receiving highly polished,
|
||||
// or `true` for less polished but more frequent updates
|
||||
canaryUpdates: false,
|
||||
|
||||
// default font size in pixels for all tabs
|
||||
fontSize: 12,
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue