Skip to content

Instantly share code, notes, and snippets.

View daveharding's full-sized avatar

David Harding daveharding

View GitHub Profile
@gavinwilliams
gavinwilliams / build.xml
Created September 7, 2011 10:02
This ant task will automatically clear your Drupal cache with every build/save. Gone are the days of logging into the admin panel to clear the Drupal cache to preview your template or modifying Drupal to get around it!
<!--
1. Download and add drush to your template folder or put it somewhere on your computer and symlink it - http://drupal.org/project/drush
2. Add the following task to your Ant build file after your deployment tasks
3. 'dir' is the path to your local deployment i.e. /Users/yourname/Sites/yourwebsite/public_html
4. 'executable' is the path to your drush command. Simply use drush in this attribute if you have symlinked it
-->
<exec dir="${path.deploy}" executable="${directory.build.tools}/drush/drush" failonerror="true" output="/dev/null">
<arg line="cache-clear all" />
</exec>