Spinning up new orgs, our team is wasting a significat beef of time simply to cleanup the sample-data you get rolling into new vanilla orgs...
Personally I think as partners we should get the option to spin orgs empty - but if we have to stick with the sample-data, we would like to have a one-step killer command, which wipes out everything.
First I looked into Resetting my development org to an empty state - which is a good start but unfortunately a multistep process.
Then I found https://github.com/financialforcedev/df12-deployment-tools - which is really cool! Running ant undeploy
deletes all custom fields and more, which is a great help so far.
Unfortunately additional page layouts survive the script and I'm not really sure why. Looking at the code, it seems that Layouts are covered, e.g. at line 178 they get queried:
<types>
<members>*</members>
<name>Layout</name>
</types>
But I'm not really sure they are processed - or if they are deletable this way at all. In eclipse, deleting page layouts result only in a local deletion and in the UI we run into the annoying replace-dialog when we want to delete them.
Is it possible to extend the undeploy.xml to get rid of any additional layouts? If so, what needs to be changed?