ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Greenlee" <CGreen...@demandsolutions.com>
Subject RE: Getting a relative time from within Ant
Date Thu, 08 Mar 2001 22:34:28 GMT

Does CVS actually understand '10 minutes ago'?

C.

> -----Original Message-----
> From: Michael Baker [mailto:Michael.Baker@cst-hsv.com]
> Sent: Wednesday, March 07, 2001 12:31 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: Getting a relative time from within Ant
> 
> 
> Chris,
> 
> How about something like this:
> 
>    <target name="extract">
>       <delete dir="${build.source}"/>
>       <cvs cvsRoot="${build.cvsRoot}" command="-q checkout -D 
> '10 minutes
> ago'"
>          package="${build.package}" dest="."/>
>    </target>
> 
> Mickey Baker
> 
> ----- Original Message -----
> From: "Chris Greenlee" <CGreenlee@demandsolutions.com>
> To: <ant-user@jakarta.apache.org>
> Sent: Wednesday, March 07, 2001 11:17 AM
> Subject: Getting a relative time from within Ant
> 
> 
> Hi all,
> 
> As part of our automated build process, we're checking out our project
> source into a clean directory on our build machine.  We're 
> using CVS to
> do this (and the cvs task), and it's working great.  But after reading
> Martin Fowler's article on using ant and JUnit for doing continuous
> integration testing
> (http://www.martinfowler.com/articles/continuousIntegration.ht
ml), we've
decided we ought to be building testing the code that was checked in a
little while prior to the start time of the automated build.  That way
no one is in the process of checking in files and screwing up
dependencies when we grab a version to build and test.

What I haven't been able to figure out is how we can get, from within
ant, the time ten minutes ago.  Using <tstamp/> we can get the current
date and time, but that's not what we need -- we're looking for that
time minus ten minutes.  Is there a way to do this?

(For now we're using ${DSTAMP} along with a time passed in on the
command line, but that's not really an elegant solution.)

Thanks in advance,

Chris Greenlee


Mime
View raw message