ci: install electron-builder only when releasing
This commit is contained in:
2258
package-lock.json
generated
2258
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,6 @@
|
|||||||
"cross-env": "5.0.5",
|
"cross-env": "5.0.5",
|
||||||
"devtron": "1.4.0",
|
"devtron": "1.4.0",
|
||||||
"electron": "1.7.5",
|
"electron": "1.7.5",
|
||||||
"electron-builder": "19.42.2",
|
|
||||||
"electron-debug": "1.4.0",
|
"electron-debug": "1.4.0",
|
||||||
"electron-devtools-installer": "2.2.0",
|
"electron-devtools-installer": "2.2.0",
|
||||||
"electron-log": "2.2.9",
|
"electron-log": "2.2.9",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const jsonfile = require('jsonfile');
|
const jsonfile = require('jsonfile');
|
||||||
|
const exec = require('child_process').execSync;
|
||||||
|
|
||||||
const TEST_BUILD = process.env.TEST_BUILD;// set true if you would like to test on your local machine
|
const TEST_BUILD = process.env.TEST_BUILD;// set true if you would like to test on your local machine
|
||||||
const DIR = process.env.DIR;
|
const DIR = process.env.DIR;
|
||||||
@@ -39,6 +40,8 @@ if (!isReleaseCommit) {
|
|||||||
process.exit(0)
|
process.exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exec("npm i -g electron-builder");
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const builder = require("electron-builder");
|
const builder = require("electron-builder");
|
||||||
const Platform = builder.Platform;
|
const Platform = builder.Platform;
|
||||||
@@ -62,7 +65,7 @@ if (process.platform === 'darwin') {
|
|||||||
target = Platform.WINDOWS.createTarget('nsis', builder.Arch.ia32, builder.Arch.x64);
|
target = Platform.WINDOWS.createTarget('nsis', builder.Arch.ia32, builder.Arch.x64);
|
||||||
artifactName += '-${arch}.${ext}';
|
artifactName += '-${arch}.${ext}';
|
||||||
} else if (process.platform === 'linux') {
|
} else if (process.platform === 'linux') {
|
||||||
target = Platform.LINUX.createTarget('AppImage', builder.Arch.ia32, builder.Arch.x64, builder.Arch.armv7l);
|
target = Platform.LINUX.createTarget();
|
||||||
artifactName += '-${arch}.${ext}';
|
artifactName += '-${arch}.${ext}';
|
||||||
extraResources.push('rules/setup-rules.sh');
|
extraResources.push('rules/setup-rules.sh');
|
||||||
extraResources.push('rules/50-uhk60.rules');
|
extraResources.push('rules/50-uhk60.rules');
|
||||||
|
|||||||
Reference in New Issue
Block a user