scolladon / sfdx-git-delta

Generate the sfdx content in source format from two git commits
Other
414 stars 112 forks source link

Support the WebStoreTemplate metadata type #776

Closed scolladon closed 7 months ago

scolladon commented 7 months ago

Discussed in https://github.com/scolladon/sfdx-git-delta/discussions/774

Originally posted by **marcoalmodova** January 30, 2024 Hi, I was checking the files with the API versions and I could not find it there, but can the WebStoreTemplate metadata type be supported? We are using the plugin in a project and it does not detect the changes to this type of metadata. There is the SF doc about it: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_webstoretemplate.htm Thanks!
marcoalmodova commented 7 months ago

Thanks for the quick response and action, @scolladon ! ❤️

github-actions[bot] commented 7 months ago

Shipped in release v5.36.0. You can install the new version using the version number or the latest-rc channel

$ sfdx plugins:install sfdx-git-delta@latest-rc
$ sfdx plugins:install sfdx-git-delta@v5.36.0

Happy incremental deployment!

marcoalmodova commented 7 months ago

Thanks again, @scolladon ! Buying you a beer ;)

scolladon commented 7 months ago

Thank you very much @marcoalmodova ! You are the first one, it really means something to me 🥹

marcoalmodova commented 7 months ago

Hey @scolladon , I updated the plugin and tested it, but it's not picking up the changes. I tested with a commit right before and the one adding a webStoreTemplate file. Can you have a second look at it, please?

scolladon commented 7 months ago

Hi @marcoalmodova, the plugin is updated but only the channel latest-rc has the new change.

Could you check the version you have ? (sfdx plugins)

marcoalmodova commented 7 months ago

Hi @scolladon , yes, I have the latest version: sfdx-git-delta 5.36.0 (latest-rc)

marcoalmodova commented 7 months ago

Maybe because the folder name is camel cased? Not sure if that will make a difference in the way the plugin parses the files. In the PR I can see that the folder name is not camel cased.

image

scolladon commented 7 months ago

That's it @marcoalmodova, the documentation says the file extension and the folder name is lower case. The plugin cannot match on either as in your exemple it is camel case and the plugin is case sensitive. If you could make both the folder and the file extension lower case it would match. Also the folder is webstoretemplate without an "s" in the end according to the doc.

marcoalmodova commented 7 months ago

But that's how the file is pulled from the scratch orgs, I didn't rename anything (the same about the folder). So maybe the SF docs are wrong, but in any case the plugin should expect it to be camel cased. What do you think?

scolladon commented 7 months ago

We already had this kind of situation in the past. We prefer to use the documentation as the source of truth.

Just to be sure, you could create an issue in sf cli and see how they propose to fix it (the doc or the way the cli retrieve). You could link this issue to the one in the cli.

In the meantime, you can change the folder name to be lower case, next retrieve will not change the folder.

marcoalmodova commented 7 months ago

Renaming worked just fine, thanks. I will also open an issue on the sf cli repository.