PROBLEM 1:

I want to set the date in the version.properties file of my project.
In the past I've used this Unix command to get today's date:

  DATE=`date '+%d %b %Y'`       // 26 Jan 2005

That is, how can I set the date and assign it to a variable in Ant?


PROBLEM 2:

Then I want to replace the date in the file below.
It looks like the Replace task won't work because it cannot do a wildcard
search.  This is what I've been using:

  sed "s/build...*)/build date: $DATE)/" < $VERSION_PROPERTIES > 
$VERSION_PROPERTIES_NEW


----------------------- version.properties --------------------------- # # @(#)version.properties # mifdoclet.version=1.5 beta 1 and 1.4 beta 1 (build date: 26 Jan 2005) ----------------------------------------------------------------------

I suppose I could separate out the date and make it a separate property,
and then use the PropertyFile task to update it.

-Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to