mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-10 14:44:52 +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
|
return version
|
||||||
|
|
||||||
uploadDMGToS3 = (s3Client) ->
|
uploadDMGToS3 = (s3Client) ->
|
||||||
destName = "Edgehill_#{getVersion()}.dmg"
|
destName = "#{process.platform}/Edgehill_#{getVersion()}.dmg"
|
||||||
dmgPath = path.join(grunt.config.get('atom.buildDir'), dmgName())
|
dmgPath = path.join(grunt.config.get('atom.buildDir'), dmgName())
|
||||||
new Promise (resolve, reject) ->
|
new Promise (resolve, reject) ->
|
||||||
uploadFile(s3Client, dmgPath, destName)
|
uploadFile(s3Client, dmgPath, destName)
|
||||||
|
@ -90,7 +90,7 @@ module.exports = (grunt) ->
|
||||||
.catch(reject)
|
.catch(reject)
|
||||||
|
|
||||||
uploadZipToS3 = (s3Client) ->
|
uploadZipToS3 = (s3Client) ->
|
||||||
destName = "Edgehill_#{getVersion()}.zip"
|
destName = "#{process.platform}/Edgehill_#{getVersion()}.zip"
|
||||||
buildDir = grunt.config.get('atom.buildDir')
|
buildDir = grunt.config.get('atom.buildDir')
|
||||||
|
|
||||||
grunt.log.writeln ">> Creating zip file…"
|
grunt.log.writeln ">> Creating zip file…"
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe "AutoUpdateManager", ->
|
||||||
c5 = get: -> "commit"
|
c5 = get: -> "commit"
|
||||||
c6 = get: -> "foo"
|
c6 = get: -> "foo"
|
||||||
|
|
||||||
base = "https://edgehill.nylas.com/update-check?version="
|
base = "https://edgehill.nylas.com/update-check?platform=#{process.platform}&version="
|
||||||
|
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@feedUrl = (version, config) ->
|
@feedUrl = (version, config) ->
|
||||||
|
|
|
@ -18,13 +18,13 @@ class AutoUpdateManager
|
||||||
|
|
||||||
constructor: (@version, @config, @specMode) ->
|
constructor: (@version, @config, @specMode) ->
|
||||||
@state = IdleState
|
@state = IdleState
|
||||||
|
|
||||||
if process.platform is 'win32'
|
if process.platform is 'win32'
|
||||||
# Squirrel for Windows can't handle query params
|
# Squirrel for Windows can't handle query params
|
||||||
# https://github.com/Squirrel/Squirrel.Windows/issues/132
|
# 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
|
else
|
||||||
upgradeLevel = @getUpgradeLevel()
|
@feedUrl = "https://edgehill.nylas.com/update-check?platform=#{process.platform}&version=#{@version}&level=#{@getUpgradeLevel()}"
|
||||||
@feedUrl = "https://edgehill.nylas.com/update-check?version=#{@version}&level=#{upgradeLevel}"
|
|
||||||
|
|
||||||
if not @specMode
|
if not @specMode
|
||||||
process.nextTick => @setupAutoUpdater()
|
process.nextTick => @setupAutoUpdater()
|
||||||
|
|
Loading…
Add table
Reference in a new issue