From faa1dd61909413134632c2f50b1b44dc0923046c Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 24 Aug 2015 10:47:43 -0700 Subject: [PATCH] fix(build-flow): More minor tweaks to applescript runner --- build/tasks/publish-nylas-build-task.coffee | 25 +++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/build/tasks/publish-nylas-build-task.coffee b/build/tasks/publish-nylas-build-task.coffee index 36149a440..4ea090266 100644 --- a/build/tasks/publish-nylas-build-task.coffee +++ b/build/tasks/publish-nylas-build-task.coffee @@ -139,24 +139,25 @@ module.exports = (grunt) -> grunt.registerTask "publish-nylas-build", "Publish Nylas build", -> done = @async() - 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()) + runEmailIntegrationTest().then -> + dmgPath = path.join(grunt.config.get('atom.buildDir'), 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." + 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()) - s3Client = prepareS3() - if s3Client - runEmailIntegrationTest().then -> + 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) return false - else - return false + else + return false