mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-06 11:16:10 +08:00
ci(mac): Fix zip creation and upload for updater
This commit is contained in:
parent
2e3ce9cd90
commit
fdab49d31d
1 changed files with 8 additions and 8 deletions
|
@ -98,29 +98,29 @@ module.exports = (grunt) ->
|
||||||
postToSlack(msg).then ->
|
postToSlack(msg).then ->
|
||||||
Promise.resolve(data)
|
Promise.resolve(data)
|
||||||
|
|
||||||
uploadZipToS3 = (filename, key) ->
|
uploadZipToS3 = (filenameToZip, key) ->
|
||||||
buildDir = grunt.config.get('atom.buildDir')
|
buildDir = grunt.config.get('atom.buildDir')
|
||||||
filepath = path.join(buildDir, filename)
|
buildZipFilename = "#{filenameToZip}.zip"
|
||||||
|
buildZipPath = path.join(buildDir, buildZipFilename)
|
||||||
|
|
||||||
grunt.log.writeln ">> Creating zip file…"
|
grunt.log.writeln ">> Creating zip file…"
|
||||||
|
|
||||||
new Promise (resolve, reject) ->
|
new Promise (resolve, reject) ->
|
||||||
zipFilepath = filepath + ".zip"
|
rm(buildZipPath)
|
||||||
rm(zipFilepath)
|
|
||||||
orig = process.cwd()
|
orig = process.cwd()
|
||||||
process.chdir(buildDir)
|
process.chdir(buildDir)
|
||||||
|
|
||||||
spawn
|
spawn
|
||||||
cmd: "zip"
|
cmd: "zip"
|
||||||
args: ["-9", "-y", "-r", zipFilepath, filename]
|
args: ["-9", "-y", "-r", buildZipPath, filenameToZip]
|
||||||
, (error) ->
|
, (error) ->
|
||||||
process.chdir(orig)
|
process.chdir(orig)
|
||||||
if error
|
if error
|
||||||
reject(error)
|
reject(error)
|
||||||
return
|
return
|
||||||
|
|
||||||
grunt.log.writeln ">> Created #{zipFilepath}"
|
grunt.log.writeln ">> Created #{buildZipPath}"
|
||||||
grunt.log.writeln ">> Uploading…"
|
uploadToS3(buildZipFilename, key).then(resolve).catch(reject)
|
||||||
uploadToS3(zipFilepath, key).then(resolve).catch(reject)
|
|
||||||
|
|
||||||
grunt.registerTask "publish-nylas-build", "Publish Nylas build", ->
|
grunt.registerTask "publish-nylas-build", "Publish Nylas build", ->
|
||||||
awsKey = process.env.AWS_ACCESS_KEY_ID ? ""
|
awsKey = process.env.AWS_ACCESS_KEY_ID ? ""
|
||||||
|
|
Loading…
Add table
Reference in a new issue