Use a string for setting the update channel (#2127)

* Adjusted config option

* Accept new config value
This commit is contained in:
Leo Lamprecht 2017-08-30 14:12:59 +02:00 committed by GitHub
parent 300f7cbde4
commit 6b886afc36
2 changed files with 13 additions and 4 deletions

View file

@ -17,7 +17,16 @@ function init() {
});
const config = getConfig();
const updatePrefix = config.canaryUpdates ? 'releases-canary' : 'releases';
// Default to the "stable" update channel
let canaryUpdates = false;
// If defined in the config, switch to the "canary" channel
if (config.updateChannel && config.updateChannel === 'canary') {
canaryUpdates = true;
}
const updatePrefix = canaryUpdates ? 'releases-canary' : 'releases';
const feedURL = `https://${updatePrefix}.hyper.is/update/${platform}`;
autoUpdater.setFeedURL(`${feedURL}/${version}`);

View file

@ -4,9 +4,9 @@
module.exports = {
config: {
// Choose either `false` for receiving highly polished,
// or `true` for less polished but more frequent updates
canaryUpdates: false,
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
// default font size in pixels for all tabs
fontSize: 12,