ci: install electron-builder only when releasing

This commit is contained in:
Róbert Kiss
2017-11-06 23:24:27 +01:00
parent b3a38a5d6c
commit 40eb2ca9a2
3 changed files with 906 additions and 1358 deletions

2258
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,6 @@
"cross-env": "5.0.5",
"devtron": "1.4.0",
"electron": "1.7.5",
"electron-builder": "19.42.2",
"electron-debug": "1.4.0",
"electron-devtools-installer": "2.2.0",
"electron-log": "2.2.9",

View File

@@ -1,5 +1,6 @@
'use strict';
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 DIR = process.env.DIR;
@@ -39,6 +40,8 @@ if (!isReleaseCommit) {
process.exit(0)
}
exec("npm i -g electron-builder");
const path = require('path');
const builder = require("electron-builder");
const Platform = builder.Platform;
@@ -62,7 +65,7 @@ if (process.platform === 'darwin') {
target = Platform.WINDOWS.createTarget('nsis', builder.Arch.ia32, builder.Arch.x64);
artifactName += '-${arch}.${ext}';
} 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}';
extraResources.push('rules/setup-rules.sh');
extraResources.push('rules/50-uhk60.rules');