From 3d955a6e5e57a2bdf2aef1d42ed91de4e98953f2 Mon Sep 17 00:00:00 2001 From: Aubrey Keus Date: Mon, 25 Sep 2017 18:10:59 -0400 Subject: [PATCH] Add conditional to download and apply RELEASES file on Windows if he braveURL attribute is set in the metadata respone. This will download the version specified, not the latest version is happening before this commit. Auditors: @bbondy, @clifton Test plan: * Change version in package.json to something lower than current * Build browser on Windows * Install and check for updates * Ensure the following line is shown in SquirrelSetup.log It must contain a version number (0.19.16 in example below) 2017-09-25 18:04:13> CheckForUpdateImpl: Downloading RELEASES file from https://brave-download.global.ssl.fastly.net/multi-channel/releases/beta/0.19.16/winx64 --- app/updater.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/updater.js b/app/updater.js index 7521b7ccf8a..7120f562975 100644 --- a/app/updater.js +++ b/app/updater.js @@ -187,6 +187,9 @@ var downloadHandler = (err, metadata) => { if (process.platform === 'win32') { // check versions to see if an update is required if (metadata) { + if (metadata.braveURL) { + autoUpdater.setFeedURL(metadata.braveURL) + } autoUpdater.checkForUpdates() } else { autoUpdater.emit(messages.UPDATE_NOT_AVAILABLE)