mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-10 06:34:40 +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 = ->
|
publishPath = ->
|
||||||
process.env.PUBLISH_PATH ? defaultPublishPath()
|
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) ->
|
postToSlack = (msg) ->
|
||||||
new Promise (resolve, reject) ->
|
new Promise (resolve, reject) ->
|
||||||
url = "https://hooks.slack.com/services/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"
|
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", ->
|
grunt.registerTask "publish-nylas-build", "Publish Nylas build", ->
|
||||||
done = @async()
|
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
|
if not fs.existsSync dmgPath
|
||||||
grunt.log.error "DMG does not exist at #{dmgPath}. Run script/grunt build first."
|
grunt.log.error "DMG does not exist at #{dmgPath}. Run script/grunt build first."
|
||||||
cp dmgPath, path.join(publishPath(), dmgName())
|
cp dmgPath, path.join(publishPath(), dmgName())
|
||||||
|
|
||||||
grunt.log.ok "Copied DMG to #{publishPath()}"
|
grunt.log.ok "Copied DMG to #{publishPath()}"
|
||||||
if publishPath() is defaultPublishPath()
|
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 "Set the PUBLISH_PATH environment variable to change where Edgehill copies the built file to."
|
||||||
|
|
||||||
s3Client = prepareS3()
|
s3Client = prepareS3()
|
||||||
|
if s3Client
|
||||||
if s3Client
|
Promise.all([uploadDMGToS3(s3Client), uploadZipToS3(s3Client)]).then ->
|
||||||
Promise.all([uploadDMGToS3(s3Client), uploadZipToS3(s3Client)])
|
done()
|
||||||
.then ->
|
.catch (err) ->
|
||||||
done()
|
grunt.log.error(err)
|
||||||
.catch (err) ->
|
return false
|
||||||
grunt.log.error(err)
|
else
|
||||||
return false
|
return false
|
||||||
else return false
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
# The credentials for the Keychain are availble via the Jenkins-injected
|
# The credentials for the Keychain are availble via the Jenkins-injected
|
||||||
# KEYCHAIN_ACCESS environment variable.
|
# KEYCHAIN_ACCESS environment variable.
|
||||||
|
|
||||||
rm -rf ~/.nylas;
|
|
||||||
echo "---> $(npm --version)"
|
echo "---> $(npm --version)"
|
||||||
echo "---> $(node --version)"
|
echo "---> $(node --version)"
|
||||||
script/bootstrap
|
script/bootstrap
|
||||||
|
|
Loading…
Add table
Reference in a new issue