mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-26 18:10:45 +08:00
updater(*): Send current platform in update check, publish to S3 in /darwin/ folder
This commit is contained in:
parent
4267de5f1e
commit
d8ec1417ec
3 changed files with 6 additions and 6 deletions
|
@ -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…"
|
||||
|
|
|
@ -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) ->
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue