Skip to content

Commit

Permalink
fix: merge of customlabels
Browse files Browse the repository at this point in the history
  • Loading branch information
jayree committed Feb 6, 2020
1 parent 9478df5 commit 3b49d3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions oclif.manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"0.1.3","commands":{"install":{"id":"install","description":"Set up the merge driver in the current git repository.","pluginName":"sfdx-md-merge-driver","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"install to your user-level git configuration","allowNo":false},"driver":{"name":"driver","type":"option","char":"d","description":"string to install as the driver in the git configuration","default":"npx sfdx-md-merge-driver merge %O %A %B %P"},"name":{"name":"name","type":"option","char":"n","description":"String to use as the merge driver name in your configuration.","default":"sfdx-md-merge-driver"},"files":{"name":"files","type":"option","char":"t","description":"Filenames that will trigger this driver.","options":["*.profile","*.profile-meta.xml","*.permissionset","*.permissionset-meta.xml","*.labels","*.labels-meta.xml"],"default":["*.profile","*.profile-meta.xml","*.permissionset","*.permissionset-meta.xml","*.labels","*.labels-meta.xml"]}},"args":[]},"merge":{"id":"merge","description":"Check for conflicts and merge them if possible.","pluginName":"sfdx-md-merge-driver","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"%O","description":"ancestor’s version","required":true},{"name":"%A","description":"current version","required":true},{"name":"%B","description":"other branches' version","required":true},{"name":"%P","description":"pathname in which the merged result will be stored"}]},"uninstall":{"id":"uninstall","description":"Remove a previously configured driver","pluginName":"sfdx-md-merge-driver","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"global":{"name":"global","type":"boolean","char":"g","description":"install to your user-level git configuration","allowNo":false},"name":{"name":"name","type":"option","char":"n","description":"String to use as the merge driver name in your configuration.","default":"sfdx-md-merge-driver"}},"args":[]}}}
4 changes: 2 additions & 2 deletions src/utils/metadata-merger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MetadataMerger {
case /.*permissionset.*/.test(lines[lineToRead].toLowerCase()):
return 'PermissionSet'
case /.*customlabels.*/.test(lines[lineToRead].toLowerCase()):
return 'Labels'
return 'CustomLabels'
default:
console.error('Bad input, this metadata type not handled')
// eslint-disable-next-line no-process-exit
Expand All @@ -59,7 +59,7 @@ class MetadataMerger {
return '<?xml version="1.0" encoding="UTF-8"?><Profile xmlns="http://soap.sforce.com/2006/04/metadata"></Profile>'
case 'PermissionSet':
return '<?xml version="1.0" encoding="UTF-8"?><PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata"></PermissionSet>'
case 'Labels':
case 'CustomLabels':
return '<?xml version="1.0" encoding="UTF-8"?><CustomLabels xmlns="http://soap.sforce.com/2006/04/metadata"></CustomLabels>'
default:
return null
Expand Down

0 comments on commit 3b49d3d

Please sign in to comment.