mirror of
https://github.com/The-Low-Code-Foundation/OpenNoodl.git
synced 2026-01-11 14:52:55 +01:00
Add the ability to build the app as a dir
This commit is contained in:
@@ -6,6 +6,7 @@ import { BuildTarget, getDistPlatform } from './platform/build-platforms';
|
|||||||
(async function () {
|
(async function () {
|
||||||
// Inputs
|
// Inputs
|
||||||
const DISABLE_SIGNING = valueToBoolean(process.env.DISABLE_SIGNING);
|
const DISABLE_SIGNING = valueToBoolean(process.env.DISABLE_SIGNING);
|
||||||
|
const BUILD_AS_DIR = valueToBoolean(process.env.BUILD_AS_DIR);
|
||||||
const TARGET_PLATFORM = process.env.TARGET_PLATFORM;
|
const TARGET_PLATFORM = process.env.TARGET_PLATFORM;
|
||||||
|
|
||||||
if (!TARGET_PLATFORM) throw new Error('TARGET_PLATFORM is falsy');
|
if (!TARGET_PLATFORM) throw new Error('TARGET_PLATFORM is falsy');
|
||||||
@@ -39,10 +40,14 @@ import { BuildTarget, getDistPlatform } from './platform/build-platforms';
|
|||||||
console.log('--- done!');
|
console.log('--- done!');
|
||||||
|
|
||||||
const platformName = getDistPlatform(target.platform);
|
const platformName = getDistPlatform(target.platform);
|
||||||
const args = [`--${platformName}`, `--${target.arch}`].join(' ');
|
let args = [`--${target.arch}`, `--${platformName}`];
|
||||||
|
if (BUILD_AS_DIR === true) {
|
||||||
|
args.push('--dir');
|
||||||
|
}
|
||||||
|
const argsStr = args.join(' ');
|
||||||
|
|
||||||
console.log(`--- Run: 'npx electron-builder ${args}' ...`);
|
console.log(`--- Run: 'npx electron-builder ${argsStr}' ...`);
|
||||||
execSync('npx electron-builder ' + args, {
|
execSync('npx electron-builder ' + argsStr, {
|
||||||
stdio: [0, 1, 2],
|
stdio: [0, 1, 2],
|
||||||
env: Object.assign(
|
env: Object.assign(
|
||||||
DISABLE_SIGNING
|
DISABLE_SIGNING
|
||||||
|
|||||||
Reference in New Issue
Block a user