Skip to content

Commit

Permalink
feat(maker): allow user to override make targets
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and malept committed Dec 30, 2016
1 parent 07f06b4 commit bac8680
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/electron-forge-make.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const main = async () => {
.option('--skip-package', 'Assume the app is already packaged')
.option('-a, --arch [arch]', 'Target architecture')
.option('-p, --platform [platform]', 'Target build platform')
.option('-t, --targets [targets]', 'Override your mnake targets for this run')
.allowUnknownOption(true)
.action((cwd) => {
if (!cwd) return;
Expand Down Expand Up @@ -58,7 +59,10 @@ const main = async () => {
const declaredPlatform = program.platform || process.platform;

const forgeConfig = await getForgeConfig(dir);
const targets = forgeConfig.make_targets[declaredPlatform];
let targets = forgeConfig.make_targets[declaredPlatform];
if (program.targets) {
targets = program.targets.split(',');
}

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

Expand Down

0 comments on commit bac8680

Please sign in to comment.