I'm working on an Ant script to help with a Wordpress deployment (I know...). The idea here is to:
- delete the entire
vendordirectory. - delete the entire
public_html/wpdirectory. - delete everything from
public_html/content/pluginsexcept for the one PHP file:public_html/content/plugins/w3tc-wp-loader.php.
This is what I've tried (along many variations):
<delete failonerror="false" quiet="false" includeEmptyDirs="true">
<fileset dir="vendor" />
<fileset dir="public_html/wp" />
<fileset dir="public_html/content/plugins">
<exclude name="w3tc-wp-loader.php" />
</fileset>
</delete>
This kinda works:
- it deletes the contents of the
vendordirectory except for a few.gitignorefiles that exist in subdirs, so those files and their parent dirs still exist (i.e.vendor/composer/installers/.gitignore). public_html/wpis deleted, as expected.public_html/content/pluginsis left containing a bunch of subdirectories, each of which is empty (except one has a.gitignorefile). The excluded file noted in the Ant script is left, as expected.
Any idea why a) the empty dirs aren't removed and b) .gitignore files seem to stay as well (as well as their parent dirs)? What am I doing wrong?