diff --git a/app/auto-updater.js b/app/auto-updater.js index aa77e629..e904450e 100644 --- a/app/auto-updater.js +++ b/app/auto-updater.js @@ -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(); diff --git a/app/config/config-default.js b/app/config/config-default.js index 8b1db9d0..af747370 100644 --- a/app/config/config-default.js +++ b/app/config/config-default.js @@ -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,