mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-08 05:34:23 +08:00
fix(build-flow): New integration test at the end of mac builds
This commit is contained in:
parent
5b0c82abb1
commit
c21bc9498c
3 changed files with 30 additions and 17 deletions
BIN
build/run-build-and-send-screenshot.scpt
Normal file
BIN
build/run-build-and-send-screenshot.scpt
Normal file
Binary file not shown.
|
@ -17,6 +17,20 @@ module.exports = (grunt) ->
|
|||
publishPath = ->
|
||||
process.env.PUBLISH_PATH ? defaultPublishPath()
|
||||
|
||||
runEmailIntegrationTest = (s3Client) ->
|
||||
buildDir = grunt.config.get('atom.buildDir')
|
||||
new Promise (resolve, reject) ->
|
||||
appToRun = path.join(buildDir, appName())
|
||||
scriptToRun = "./build/run-build-and-send-screenshot.scpt"
|
||||
spawn
|
||||
cmd: "osascript"
|
||||
args: [scriptToRun, appToRun, getVersion()]
|
||||
, (error) ->
|
||||
if error
|
||||
process.chdir(orig)
|
||||
reject(error)
|
||||
return
|
||||
|
||||
postToSlack = (msg) ->
|
||||
new Promise (resolve, reject) ->
|
||||
url = "https://hooks.slack.com/services/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"
|
||||
|
@ -126,23 +140,23 @@ module.exports = (grunt) ->
|
|||
grunt.registerTask "publish-nylas-build", "Publish Nylas build", ->
|
||||
done = @async()
|
||||
|
||||
dmgPath = path.join(grunt.config.get('atom.buildDir'), dmgName())
|
||||
runEmailIntegrationTest().then ->
|
||||
dmgPath = path.join(grunt.config.get('atom.buildDir'), dmgName())
|
||||
|
||||
if not fs.existsSync dmgPath
|
||||
grunt.log.error "DMG does not exist at #{dmgPath}. Run script/grunt build first."
|
||||
cp dmgPath, path.join(publishPath(), dmgName())
|
||||
if not fs.existsSync dmgPath
|
||||
grunt.log.error "DMG does not exist at #{dmgPath}. Run script/grunt build first."
|
||||
cp dmgPath, path.join(publishPath(), dmgName())
|
||||
|
||||
grunt.log.ok "Copied DMG to #{publishPath()}"
|
||||
if publishPath() is defaultPublishPath()
|
||||
grunt.log.ok "Set the PUBLISH_PATH environment variable to change where Edgehill copies the built file to."
|
||||
grunt.log.ok "Copied DMG to #{publishPath()}"
|
||||
if publishPath() is defaultPublishPath()
|
||||
grunt.log.ok "Set the PUBLISH_PATH environment variable to change where Edgehill copies the built file to."
|
||||
|
||||
s3Client = prepareS3()
|
||||
|
||||
if s3Client
|
||||
Promise.all([uploadDMGToS3(s3Client), uploadZipToS3(s3Client)])
|
||||
.then ->
|
||||
done()
|
||||
.catch (err) ->
|
||||
grunt.log.error(err)
|
||||
s3Client = prepareS3()
|
||||
if s3Client
|
||||
Promise.all([uploadDMGToS3(s3Client), uploadZipToS3(s3Client)]).then ->
|
||||
done()
|
||||
.catch (err) ->
|
||||
grunt.log.error(err)
|
||||
return false
|
||||
else
|
||||
return false
|
||||
else return false
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
# The credentials for the Keychain are availble via the Jenkins-injected
|
||||
# KEYCHAIN_ACCESS environment variable.
|
||||
|
||||
rm -rf ~/.nylas;
|
||||
echo "---> $(npm --version)"
|
||||
echo "---> $(node --version)"
|
||||
script/bootstrap
|
||||
|
|
Loading…
Add table
Reference in a new issue