Skip to content

Commit bac8680

Browse files
MarshallOfSoundmalept
authored andcommitted
feat(maker): allow user to override make targets
1 parent 07f06b4 commit bac8680

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/electron-forge-make.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const main = async () => {
2121
.option('--skip-package', 'Assume the app is already packaged')
2222
.option('-a, --arch [arch]', 'Target architecture')
2323
.option('-p, --platform [platform]', 'Target build platform')
24+
.option('-t, --targets [targets]', 'Override your mnake targets for this run')
2425
.allowUnknownOption(true)
2526
.action((cwd) => {
2627
if (!cwd) return;
@@ -58,7 +59,10 @@ const main = async () => {
5859
const declaredPlatform = program.platform || process.platform;
5960

6061
const forgeConfig = await getForgeConfig(dir);
61-
const targets = forgeConfig.make_targets[declaredPlatform];
62+
let targets = forgeConfig.make_targets[declaredPlatform];
63+
if (program.targets) {
64+
targets = program.targets.split(',');
65+
}
6266

6367
console.info('Making for the following targets:', `${targets.join(', ')}`.cyan);
6468

0 commit comments

Comments
 (0)