diff --git a/build/tasks/publish-nylas-build-task.coffee b/build/tasks/publish-nylas-build-task.coffee index b71ec28aa..a22a93771 100644 --- a/build/tasks/publish-nylas-build-task.coffee +++ b/build/tasks/publish-nylas-build-task.coffee @@ -77,7 +77,7 @@ module.exports = (grunt) -> return version uploadDMGToS3 = (s3Client) -> - destName = "Edgehill_#{getVersion()}.dmg" + destName = "#{process.platform}/Edgehill_#{getVersion()}.dmg" dmgPath = path.join(grunt.config.get('atom.buildDir'), dmgName()) new Promise (resolve, reject) -> uploadFile(s3Client, dmgPath, destName) @@ -90,7 +90,7 @@ module.exports = (grunt) -> .catch(reject) uploadZipToS3 = (s3Client) -> - destName = "Edgehill_#{getVersion()}.zip" + destName = "#{process.platform}/Edgehill_#{getVersion()}.zip" buildDir = grunt.config.get('atom.buildDir') grunt.log.writeln ">> Creating zip fileā€¦" diff --git a/spec-nylas/auto-update-manager-spec.coffee b/spec-nylas/auto-update-manager-spec.coffee index e5ad65642..59f0f3dae 100644 --- a/spec-nylas/auto-update-manager-spec.coffee +++ b/spec-nylas/auto-update-manager-spec.coffee @@ -8,7 +8,7 @@ describe "AutoUpdateManager", -> c5 = get: -> "commit" c6 = get: -> "foo" - base = "https://edgehill.nylas.com/update-check?version=" + base = "https://edgehill.nylas.com/update-check?platform=#{process.platform}&version=" beforeEach -> @feedUrl = (version, config) -> diff --git a/src/browser/auto-update-manager.coffee b/src/browser/auto-update-manager.coffee index 05577e760..503ee4646 100644 --- a/src/browser/auto-update-manager.coffee +++ b/src/browser/auto-update-manager.coffee @@ -18,13 +18,13 @@ class AutoUpdateManager constructor: (@version, @config, @specMode) -> @state = IdleState + if process.platform is 'win32' # Squirrel for Windows can't handle query params # https://github.com/Squirrel/Squirrel.Windows/issues/132 - @feedUrl = 'https://edgehill.nylas.com/update-check' + @feedUrl = "https://edgehill.nylas.com/update-check/win32/#{@getUpgradeLevel()}/#{@version}" else - upgradeLevel = @getUpgradeLevel() - @feedUrl = "https://edgehill.nylas.com/update-check?version=#{@version}&level=#{upgradeLevel}" + @feedUrl = "https://edgehill.nylas.com/update-check?platform=#{process.platform}&version=#{@version}&level=#{@getUpgradeLevel()}" if not @specMode process.nextTick => @setupAutoUpdater()