amtrack / force-dev-tool

[DEPRECATED] Command line tool supporting the Force.com development lifecycle
MIT License
108 stars 37 forks source link

fix: update named children of complex metadata #236

Closed amtrack closed 4 years ago

amtrack commented 4 years ago

Closes #218

amtrack commented 4 years ago

@froucher Could you please have a look at my test?

I just tried to add another test case, but unfortunately it fails with:

Failures:

1) Scenario: Simple metadata are added, updated # test-functional/feature/changeset-simple-metadata.feature:15
   ✔ Given a list of "Profile" metadata in "simple-metadata/profile-custom-settings" folder which has been changed in a git repository # test-functional/step-definitions/changeSet.js:22
   ✖ When a user launches a change set with force-dev-tool # test-functional/step-definitions/changeSet.js:26
       AssertionError: expected '' to include 'Manifest:'
           at World.<anonymous> (/Users/matthias/Projects/github.com/amtrack/force-dev-tool/test-functional/step-definitions/changeSet.js:28:36)
   - Then it will create a change set with all "Profile" metadata # test-functional/step-definitions/changeSet.js:48
   - And the change set could be deployed correctly # test-functional/step-definitions/changeSet.js:59
   ✔ After # test-functional/step-definitions/changeSet.js:69

Inspecting the git history of the temp folder, I can see that somehow the second commit moved the files to src/v1 and I don't know why.

$ git whatchanged
commit 7ec12e6099a5e9737d11fcc2b02173e4536ff24d (HEAD -> master)
Author: Matthias Rolke <mr.amtrack@gmail.com>
Date:   Tue May 12 15:37:28 2020 +0200

    Last commit

:100644 100644 b5f0c4a b5f0c4a R100     src/objects/MyCustomSetting__c.object   src/v1/objects/MyCustomSetting__c.object
:100644 100644 d4d1946 d4d1946 R100     src/package.xml src/v1/package.xml
:100644 100644 8128ac9 8777cd5 R099     src/profiles/Admin.profile      src/v1/profiles/Admin.profile

commit fabf9b9122d546077b1d6c16f4aca79f79c16195
Author: Matthias Rolke <mr.amtrack@gmail.com>
Date:   Tue May 12 15:37:28 2020 +0200

    First commit

:000000 100644 0000000 b5f0c4a A        src/objects/MyCustomSetting__c.object
:000000 100644 0000000 d4d1946 A        src/package.xml
:000000 100644 0000000 8128ac9 A        src/profiles/Admin.profile

It looks like those two lines are unused:

https://github.com/amtrack/force-dev-tool/blob/ea74ef4d48d99917f195563e5f4859d726c4f280/test-functional/lib/force-dev-tool.js#L99-L100

Do you have an idea why the second commit moves the files to src/v1?

amtrack commented 4 years ago

@froucher just figured it out myself. 😄 I had a hidden .DS_Store file in the data folder and so git rm -r src didn't remove the src folder completely. The follow up cp -r command then placed it inside src/v1.

amtrack commented 4 years ago

:tada: This PR is included in version 2.6.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: