ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emma Burrows <Emma.Burr...@rpharms.com>
Subject Use Ant <modified> with an arbitrary date
Date Tue, 29 Nov 2011 09:23:54 GMT
As part of a content migration project, I am building content into a CMS on a weekly basis,
and I use an Ant script to copy the content files to the build directory. Up until now, we've
been wiping the CMS and reloading the whole 17,000-file set every time, which takes about
1.5 hours. But now that the content and the CMS customisations are more stable, we'd like
to only upload the content files that have been modified since the previous week.

I can copy files modified since the last time I ran the Ant script using the <modified>
selector:

<copy todir="changed" failonerror="no">
  <fileset dir="output" includes="*.*">
    <modified/>
  </fileset>
</copy>

Which works very nicely. However, I would like to be able to load the files that have been
modified since the last CMS build that took place on the server, typically on the previous
Thursday.

So I was wondering if there was some way of using <modified>'s cache-based approach
to only copy the files that have been modified since a given date/time like "17.00 last Thursday"
instead of "last time this script was run".

Having researched the question, I'm guessing some kind of custom task might be required, but
I'm hoping someone might have already invented that particular wheel. ;)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message