mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 21:57:55 +08:00
8599bc0397
Summary: - We now make verbose log files continuously as you use the app - We ship the logs to LogStash via S3 when an exception occurs - We log the DatabaseStore, ActionBridge and Analytics packages - We are now on the latest version of Electron 0.26.0 - We are now on Chrome 42 and io.js 1.4.3 - We should be setup to use ASAR soon. Update atom.sh to reflect that we're now electron oniguruma was unnecessary correctly find log files that haven't been shipped yet Fix a small issue with nodeIsVisible after upgrade to Chrome 42 Delete old logs, better logging from database store, don't ship empty logs Test Plan: Run existing tests Reviewers: evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D1531
59 lines
1.9 KiB
CoffeeScript
59 lines
1.9 KiB
CoffeeScript
fs = require 'fs'
|
|
path = require 'path'
|
|
_ = require 'underscore'
|
|
Promise = require("bluebird")
|
|
|
|
module.exports = (grunt) ->
|
|
{spawn, rm} = require('./task-helpers')(grunt)
|
|
|
|
appName = -> grunt.config.get('atom.appName')
|
|
dmgName = -> "#{appName().split('.')[0]}.dmg"
|
|
buildDir = -> grunt.config.get('atom.buildDir')
|
|
dmgPath = -> path.join(buildDir(), dmgName())
|
|
appDir = -> path.join(buildDir(), grunt.config.get('atom.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("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()
|