mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-27 02:23:28 +08:00
feat(build): build DMG
Summary: We need people to manually drag into their /Applications folders due to OSX gatekeeper protections. Test Plan: manual Reviewers: juan, khamidou Reviewed By: khamidou Differential Revision: https://phab.nylas.com/D3756
This commit is contained in:
parent
ea5c9db46e
commit
3614f1e2f2
7 changed files with 35 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -16,6 +16,7 @@ debug.log
|
|||
docs/output
|
||||
docs/includes
|
||||
spec/fixtures/evil-files/
|
||||
build/resources/certs
|
||||
/_site
|
||||
/.sass-cache
|
||||
.integration-test-config
|
||||
|
|
|
@ -54,7 +54,8 @@ module.exports = (grunt) => {
|
|||
if (grunt.option('platform') === 'win32') {
|
||||
postBuildSteps.push('create-windows-installer')
|
||||
} else if (grunt.option('platform') === 'darwin') {
|
||||
postBuildSteps.push('create-mac-installer')
|
||||
postBuildSteps.push('create-mac-zip')
|
||||
postBuildSteps.push('create-mac-dmg')
|
||||
} else if (grunt.option('platform') === 'linux') {
|
||||
postBuildSteps.push('create-deb-installer');
|
||||
postBuildSteps.push('create-rpm-installer');
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
"archiver": "1.2.x",
|
||||
"chalk": "1.x.x",
|
||||
"coffeelint-cjsx": "^2.0",
|
||||
"electron-installer-dmg": "0.2.0",
|
||||
"electron-packager": "^8.4.0",
|
||||
"glob": "7.1.1",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-cli": "~0.1.9",
|
||||
"grunt-coffee-react": "^5.0.0",
|
||||
|
@ -21,7 +23,6 @@
|
|||
"grunt-electron-installer": "2.1.0",
|
||||
"grunt-lesslint": "0.13.0",
|
||||
"minidump": "~0.8",
|
||||
"glob": "7.1.1",
|
||||
"request": "^2.64",
|
||||
"s3": "^4.3",
|
||||
"temp": "~0.8.1",
|
||||
|
|
BIN
build/resources/mac/Nylas-Mail-DMG-Background.png
Normal file
BIN
build/resources/mac/Nylas-Mail-DMG-Background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
25
build/tasks/create-mac-dmg.js
Normal file
25
build/tasks/create-mac-dmg.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
const path = require('path');
|
||||
const createDMG = require('electron-installer-dmg')
|
||||
|
||||
module.exports = (grunt) => {
|
||||
grunt.registerTask('create-mac-dmg', 'Create DMG for Nylas Mail', function pack() {
|
||||
const done = this.async();
|
||||
const dmgPath = path.join(grunt.config('outputDir'), "NylasMail.dmg");
|
||||
createDMG({
|
||||
appPath: path.join(grunt.config('outputDir'), "Nylas Mail-darwin-x64", "Nylas Mail.app"),
|
||||
name: "NylasMail",
|
||||
background: path.resolve(grunt.config('appDir'), 'build', 'resources', 'mac', 'Nylas-Mail-DMG-background.png'),
|
||||
icon: path.resolve(grunt.config('appDir'), 'build', 'resources', 'mac', 'nylas.icns'),
|
||||
overwrite: true,
|
||||
out: grunt.config('outputDir'),
|
||||
}, (err) => {
|
||||
if (err) {
|
||||
done(err);
|
||||
return
|
||||
}
|
||||
|
||||
grunt.log.writeln(`>> Created ${dmgPath}`);
|
||||
done(null);
|
||||
})
|
||||
});
|
||||
};
|
|
@ -6,7 +6,7 @@ const path = require('path');
|
|||
module.exports = (grunt) => {
|
||||
const {spawn} = require('./task-helpers')(grunt);
|
||||
|
||||
grunt.registerTask('create-mac-installer', 'Zip up Nylas Mail', function pack() {
|
||||
grunt.registerTask('create-mac-zip', 'Zip up Nylas Mail', function pack() {
|
||||
const done = this.async();
|
||||
const zipPath = path.join(grunt.config('outputDir'), 'NylasMail.zip');
|
||||
|
|
@ -107,6 +107,10 @@ module.exports = (grunt) => {
|
|||
source: `${outputDir}/NylasMail.zip`,
|
||||
key: `${fullVersion}/${process.platform}/${process.arch}/NylasMail.zip`,
|
||||
});
|
||||
uploads.push({
|
||||
source: `${outputDir}/NylasMail.dmg`,
|
||||
key: `${fullVersion}/${process.platform}/${process.arch}/NylasMail.dmg`,
|
||||
});
|
||||
} else if (process.platform === 'win32') {
|
||||
uploads.push({
|
||||
source: `${outputDir}/RELEASES`,
|
||||
|
|
Loading…
Reference in a new issue