From 3c37e3189463620cd6b1ad699e9f0588947c9824 Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Fri, 28 Oct 2016 11:08:09 -0400 Subject: [PATCH] fix(build): remove dmg task from build --- .gitignore | 1 - build/Gruntfile.coffee | 4 -- build/tasks/mkdmg-task.coffee | 59 --------------------- build/tasks/publish-nylas-build-task.coffee | 2 - src/pro | 2 +- 5 files changed, 1 insertion(+), 67 deletions(-) delete mode 100644 build/tasks/mkdmg-task.coffee diff --git a/.gitignore b/.gitignore index f9b54ef15..12bac58bb 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ debug.log docs/output docs/includes spec/fixtures/evil-files/ -yoursway-create-dmg /_site /.sass-cache .integration-test-config diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index fdff90e94..6a97ae527 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -389,9 +389,6 @@ module.exports = (grunt) -> ciTasks.push('dump-symbols') if process.platform isnt 'win32' ciTasks.push('set-version', 'lint', 'generate-asar') - if process.platform is "darwin" - ciTasks.push('test', 'codesign', 'mkdmg') - else if process.platform is "linux" ciTasks.push('mkdeb') ciTasks.push('mkrpm') @@ -406,6 +403,5 @@ module.exports = (grunt) -> grunt.registerTask('ci', ciTasks) defaultTasks = ['download-electron', 'build', 'set-version', 'generate-asar'] - defaultTasks.push 'mkdmg' if process.platform is 'darwin' defaultTasks.push 'install' unless process.platform is 'linux' grunt.registerTask('default', defaultTasks) diff --git a/build/tasks/mkdmg-task.coffee b/build/tasks/mkdmg-task.coffee deleted file mode 100644 index f6f6404b9..000000000 --- a/build/tasks/mkdmg-task.coffee +++ /dev/null @@ -1,59 +0,0 @@ -fs = require 'fs' -path = require 'path' -_ = require 'underscore' -Promise = require("bluebird") - -module.exports = (grunt) -> - {spawn, rm} = require('./task-helpers')(grunt) - - appName = -> grunt.config.get('nylasGruntConfig.appName') - dmgName = -> "#{appName().split('.')[0]}.dmg" - buildDir = -> grunt.config.get('nylasGruntConfig.buildDir') - dmgPath = -> path.join(buildDir(), dmgName()) - appDir = -> path.join(buildDir(), grunt.config.get('nylasGruntConfig.appName')) - - getDmgExecutable = -> - new Promise (resolve, reject) -> - dmgMakerRepo = "yoursway-create-dmg" - dmgExecutable = path.join(dmgMakerRepo, "create-dmg") - if fs.existsSync(dmgExecutable) then resolve(dmgExecutable) - else - console.log("---> Downloading yoursway-create-dmg") - spawn - cmd: "git" - args: ["clone", "https://github.com/andreyvit/#{dmgMakerRepo}"] - , (error, results, exitCode) -> - if exitCode is 0 then resolve(dmgExecutable) else reject(error) - - removeOldDmg = (dmgExecutable) -> - if fs.existsSync(dmgPath()) then rm dmgPath() - - executeDmgMaker = (dmgExecutable) -> - new Promise (resolve, reject) -> - console.log("---> Bulding Nylas DMG") - spawn - cmd: dmgExecutable - args: [ - "--volname", "Nylas Installer", - "--volicon", path.join("build", "resources", "nylas.png"), - "--window-pos", "200", "120", - "--window-size", "800", "400", - "--icon-size", "100", - "--icon", appName(), "200", "190", - "--hide-extension", appName(), - "--app-drop-link", "600", "185", - dmgPath() - appDir(), - ] - , (error, results, exitCode) -> - if exitCode is 0 then resolve() else reject(error) - - grunt.registerTask 'mkdmg', 'Create Mac DMG', -> - done = @async() - removeOldDmg() - getDmgExecutable() - .then(executeDmgMaker) - .then(done) - .catch (error) -> - console.error(error) - done() diff --git a/build/tasks/publish-nylas-build-task.coffee b/build/tasks/publish-nylas-build-task.coffee index 850b8ef8a..0d0425eb9 100644 --- a/build/tasks/publish-nylas-build-task.coffee +++ b/build/tasks/publish-nylas-build-task.coffee @@ -13,7 +13,6 @@ module.exports = (grunt) -> {cp, shouldPublishBuild, spawn, rm} = require('./task-helpers')(grunt) appName = -> grunt.config.get('nylasGruntConfig.appName') - dmgName = -> "#{appName().split('.')[0]}.dmg" zipName = -> "#{appName().split('.')[0]}.zip" winReleasesName = -> "RELEASES" winSetupName = -> "Nylas N1Setup.exe" @@ -150,7 +149,6 @@ module.exports = (grunt) -> .then -> uploadPromises = [] if process.platform is 'darwin' - uploadPromises.push uploadToS3(dmgName(), "#{fullVersion}/#{process.platform}/#{process.arch}/N1.dmg") uploadPromises.push uploadZipToS3(appName(), "#{fullVersion}/#{process.platform}/#{process.arch}/N1.zip") else if process.platform is 'win32' diff --git a/src/pro b/src/pro index 7c2183bcb..8264db554 160000 --- a/src/pro +++ b/src/pro @@ -1 +1 @@ -Subproject commit 7c2183bcb23c0a89bb5ec43e96b8a933f8b8b36f +Subproject commit 8264db5540fca5460a356728e56d0a19e8f45d9e