mirror of https://github.com/docker/docs.git
Fix electron packager update for os x
Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
parent
5d1a55386c
commit
1a17f5de23
32
Gruntfile.js
32
Gruntfile.js
|
|
@ -46,15 +46,19 @@ module.exports = function (grunt) {
|
|||
APPNAME += ' (Beta)';
|
||||
}
|
||||
|
||||
var OSX_OUT = './dist/osx';
|
||||
var OSX_FILENAME = OSX_OUT + '/' + APPNAME + '.app';
|
||||
var OSX_OUT = './dist';
|
||||
var OSX_OUT_X64 = OSX_OUT + '/' + APPNAME + '-darwin-x64';
|
||||
var OSX_FILENAME = OSX_OUT_X64 + '/' + APPNAME + '.app';
|
||||
|
||||
grunt.initConfig({
|
||||
IDENTITY: 'Developer ID Application: Docker Inc',
|
||||
APPNAME: APPNAME,
|
||||
APPNAME_ESCAPED: APPNAME.replace(/ /g, '\\ ').replace(/\(/g,'\\(').replace(/\)/g,'\\)'),
|
||||
OSX_OUT: OSX_OUT,
|
||||
OSX_OUT_ESCAPED: OSX_OUT.replace(/ /g, '\\ ').replace(/\(/g,'\\(').replace(/\)/g,'\\)'),
|
||||
OSX_OUT_X64: OSX_OUT_X64,
|
||||
OSX_FILENAME: OSX_FILENAME,
|
||||
OSX_FILENAME_ESCAPED: OSX_FILENAME.replace(' ', '\\ ').replace('(','\\(').replace(')','\\)'),
|
||||
OSX_FILENAME_ESCAPED: OSX_FILENAME.replace(/ /g, '\\ ').replace(/\(/g,'\\(').replace(/\)/g,'\\)'),
|
||||
|
||||
// electron
|
||||
electron: {
|
||||
|
|
@ -62,7 +66,7 @@ module.exports = function (grunt) {
|
|||
options: {
|
||||
name: BASENAME,
|
||||
dir: 'build/',
|
||||
out: 'dist/windows',
|
||||
out: 'dist',
|
||||
version: packagejson['electron-version'],
|
||||
platform: 'win32',
|
||||
arch: 'x64',
|
||||
|
|
@ -74,7 +78,7 @@ module.exports = function (grunt) {
|
|||
options: {
|
||||
name: APPNAME,
|
||||
dir: 'build/',
|
||||
out: '<%= OSX_OUT %>',
|
||||
out: 'dist',
|
||||
version: packagejson['electron-version'],
|
||||
platform: 'darwin',
|
||||
arch: 'x64',
|
||||
|
|
@ -103,7 +107,7 @@ module.exports = function (grunt) {
|
|||
exes: {
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: 'dist/windows/' + BASENAME + '-win32-x64',
|
||||
cwd: 'dist/' + BASENAME + '-win32-x64',
|
||||
src: [BASENAME + '.exe']
|
||||
}],
|
||||
options: {
|
||||
|
|
@ -125,8 +129,8 @@ module.exports = function (grunt) {
|
|||
|
||||
'create-windows-installer': {
|
||||
config: {
|
||||
appDirectory: path.join(__dirname, 'dist/windows/' + BASENAME + '-win32-x64'),
|
||||
outputDirectory: path.join(__dirname, 'dist/windows'),
|
||||
appDirectory: path.join(__dirname, 'dist/' + BASENAME + '-win32-x64'),
|
||||
outputDirectory: path.join(__dirname, 'dist'),
|
||||
authors: 'Docker Inc.',
|
||||
loadingGif: 'util/loading.gif',
|
||||
setupIcon: 'util/setup.ico',
|
||||
|
|
@ -178,7 +182,7 @@ module.exports = function (grunt) {
|
|||
expand: true,
|
||||
cwd: 'resources',
|
||||
src: ['docker*', 'ssh.exe', 'OPENSSH_LICENSE', 'msys-*'],
|
||||
dest: 'dist/windows/' + BASENAME + '-win32-x64/resources/resources'
|
||||
dest: 'dist/' + BASENAME + '-win32-x64/resources/resources'
|
||||
}],
|
||||
options: {
|
||||
mode: true
|
||||
|
|
@ -202,8 +206,8 @@ module.exports = function (grunt) {
|
|||
|
||||
rename: {
|
||||
installer: {
|
||||
src: 'dist/windows/Setup.exe',
|
||||
dest: 'dist/windows/' + BASENAME + 'Setup-' + packagejson.version + '-Windows-Alpha.exe'
|
||||
src: 'dist/Setup.exe',
|
||||
dest: 'dist/' + BASENAME + 'Setup-' + packagejson.version + '-Windows-Alpha.exe'
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -274,7 +278,7 @@ module.exports = function (grunt) {
|
|||
].join(' && '),
|
||||
},
|
||||
zip: {
|
||||
command: 'ditto -c -k --sequesterRsrc --keepParent <%= OSX_FILENAME_ESCAPED %> <%= OSX_OUT %>/' + BASENAME + '-' + packagejson.version + '-Mac.zip',
|
||||
command: 'ditto -c -k --sequesterRsrc --keepParent <%= OSX_FILENAME_ESCAPED %> dist/' + BASENAME + '-' + packagejson.version + '-Mac.zip',
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -285,13 +289,13 @@ module.exports = function (grunt) {
|
|||
compress: {
|
||||
windows: {
|
||||
options: {
|
||||
archive: './dist/windows/' + BASENAME + '-' + packagejson.version + '-Windows-Alpha.zip',
|
||||
archive: './dist/' + BASENAME + '-' + packagejson.version + '-Windows-Alpha.zip',
|
||||
mode: 'zip'
|
||||
},
|
||||
files: [{
|
||||
expand: true,
|
||||
dot: true,
|
||||
cwd: './dist/windows/Kitematic-win32-x64',
|
||||
cwd: './dist/Kitematic-win32-x64',
|
||||
src: '**/*'
|
||||
}]
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue