Skip to content

Commit 29fe6bb

Browse files
hotfix for buildTemplate failing + remove duplicate keys
bad variable reference
1 parent 3ac4bc7 commit 29fe6bb

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lib/Builder.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ saved
141141
/** @type {TYPE.MetadataTypeItemObj[]} */
142142
const result = await Promise.all(
143143
keyArr.map((key) => {
144-
// with npx and powershell spaces are not parsed correctly as part of a string
145-
// we hence require users to put %20 in their stead and have to convert that back
146-
key = key.split('%20').join(' ');
147-
148144
MetadataTypeInfo[type].client = this.client;
149145
MetadataTypeInfo[type].properties = this.properties;
150146
MetadataTypeInfo[type].buObject = this.buObject;

lib/util/devops.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,16 @@ const DevOps = {
328328
// init array
329329
buTypeDelta[buPath][file.type] = [];
330330
}
331-
buTypeDelta[buPath][file.type].push(file.key);
331+
buTypeDelta[buPath][file.type].push(file.externalKey);
332332
}
333333

334334
// Run buildTemplate for each business unit for each type
335335
Util.logger.info('Retrieve template from Git delta');
336336
// ! needs to be for (.. in ..) loop so that it gets executed in series
337337
for (const bu in buTypeDelta) {
338338
for (const type in buTypeDelta[bu]) {
339-
const keyArr = buTypeDelta[bu][type];
339+
// get unique list (original search might include more than one entry for types with docs or extracted code)
340+
const keyArr = [...new Set(buTypeDelta[bu][type])];
340341
Util.logger.info(
341342
`⚡ mcdev bt ${bu} ${type} "${keyArr.join(',')}" ${sourceMarket}`
342343
);

0 commit comments

Comments
 (0)