From 945ea5a4fc0ddd4eefc3838a31aea8eff506db25 Mon Sep 17 00:00:00 2001 From: Karim Hamidou Date: Fri, 13 Jan 2017 16:49:30 -0800 Subject: [PATCH] Use staging autoupdater for staging. --- src/browser/auto-update-manager.es6 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/browser/auto-update-manager.es6 b/src/browser/auto-update-manager.es6 index ae9677693..fc42dc92a 100644 --- a/src/browser/auto-update-manager.es6 +++ b/src/browser/auto-update-manager.es6 @@ -66,12 +66,17 @@ export default class AutoUpdateManager extends EventEmitter { _updateFeedURL = () => { const params = this.parameters(); + let host = `edgehill.nylas.com`; + if (this.config.settings.env === 'staging') { + host = `edgehill-staging.nylas.com`; + } + if (process.platform === 'win32') { // Squirrel for Windows can't handle query params // https://github.com/Squirrel/Squirrel.Windows/issues/132 - this.feedURL = `https://edgehill.nylas.com/update-check/win32/${params.arch}/${params.version}/${params.id}/${params.emails}` + this.feedURL = `https://${host}/update-check/win32/${params.arch}/${params.version}/${params.id}/${params.emails}` } else { - this.feedURL = `https://edgehill.nylas.com/update-check?${qs.stringify(params)}`; + this.feedURL = `https://${host}/update-check?${qs.stringify(params)}`; } if (autoUpdater) {