fix(build-flow): New integration test at the end of mac builds

This commit is contained in:
Ben Gotow 2015-08-18 18:04:47 -07:00
parent 5b0c82abb1
commit c21bc9498c
3 changed files with 30 additions and 17 deletions

Binary file not shown.

View file

@ -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

View file

@ -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