Skip to content

Commit

Permalink
#1471: replace --noMidSuffix with --autoMidSuffix
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Jul 22, 2024
1 parent 9210d1f commit 26d9808
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ yargs(hideBin(process.argv))
describe:
'allows you to add a suffix to the key of the metadata to be deployed',
})
.option('noMidSuffix', {
.option('autoMidSuffix', {
type: 'boolean',
group: 'Options for deploy:',
describe:
'for asset: disables the automatic addition of the MID to the key of the deployed metadata when deploying cross-BU. Should be used with --keySuffix or with templating-based suffixes',
'for asset: enables the automatic addition of the MID to the key of the deployed metadata when deploying cross-BU. Alternatively, use --keySuffix or templating-based suffixes',
})
.option('changeKeyField', {
type: 'string',
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Mcdev {
'noLogColors',
'noLogFile',
'noUpdate',
'noMidSuffix',
'autoMidSuffix',
'publish',
'referenceFrom',
'referenceTo',
Expand Down
2 changes: 1 addition & 1 deletion lib/metadataTypes/Asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ class Asset extends MetadataType {

// only execute #3 if we are deploying / copying from one BU to another, not while using mcdev as a developer tool
if (
!Util.OPTIONS.noMidSuffix &&
Util.OPTIONS.autoMidSuffix &&
this.buObject.mid &&
metadata.memberId != this.buObject.mid && // soft comparison to accomodate for string-version of mid
!metadata[this.definition.keyField].endsWith(this.buObject.mid)
Expand Down

0 comments on commit 26d9808

Please sign in to comment.