Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a string for setting the update channel #2127

Merged
merged 2 commits into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion app/auto-updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
6 changes: 3 additions & 3 deletions app/config/config-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down