Skip to content

Commit

Permalink
#1329: fix build --bulk parameter called via CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed May 16, 2024
1 parent 2928af9 commit 190cf68
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ yargs(hideBin(process.argv))
type: 'string',
alias: 'bt',
group: 'Required parameters for build:',
describe: 'the business unit to deploy to; ignored if --bulk is set',
demandOption: true,
describe: 'the business unit to deploy to; required unless --bulk is set',
})
.option('marketFrom', {
type: 'string',
Expand Down Expand Up @@ -392,7 +391,14 @@ yargs(hideBin(process.argv))
Mcdev.setOptions(argv);
const typeKeyCombo = Mcdev.metadataToTypeKey(argv.metadata);
if ('undefined' !== typeof typeKeyCombo) {
Mcdev.build(argv.buFrom, argv.buTo, typeKeyCombo, argv.marketFrom, argv.marketTo);
Mcdev.build(
argv.buFrom,
argv.buTo,
typeKeyCombo,
argv.marketFrom,
argv.marketTo,
argv.bulk
);
}
},
})
Expand Down
7 changes: 7 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,13 @@ class Mcdev {
marketDefinition,
bulk
) {
if (!bulk && !businessUnitDefinition) {
Util.logger.error(
'Please provide a business unit to deploy to via --buTo or activate --bulk'
);
return;
}

Util.logger.info('mcdev:: Build Template & Build Definition');
await this.buildTemplate(businessUnitTemplate, typeKeyCombo, null, marketTemplate);
return bulk
Expand Down

0 comments on commit 190cf68

Please sign in to comment.