ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Incremental build number
Date Fri, 18 Jan 2002 11:10:31 GMT
Have a look at the optional <propertyfile> task.  It has several property
file manipulations such as incrementing integers (and dates!).  You'll still
need <property file="..."/> to load it up after you increment.

    Erik

----- Original Message -----
From: "chris brown" <dev@reflexe.fr>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, January 18, 2002 5:18 AM
Subject: Incremental build number


> How can I generate an incremental build number (which I'd like to store as
> in a property for later use in the Ant script)?
>
> I only want the build number to be incremented each time I execute a
> specific target (a "compile" target for example; I don't need to increment
> it when I execute a target to generate javadocs...).  However, I would
like
> the most recent build number to be available to all targets (I'd like to
> retrieve this during execution of an "init" target).
>
> I had thought of using a properties file to store a build number... but I
> can't see any way of verifying whether the file contained the appropriate
> property name (important), and whether it was an integer (not so
important,
> but useful).  I had imagined writing a simple Java class to load the
> specified properties file and increment the build number (this would be
run
> from my "compile" target as a <Java> task).
>
> Any suggestions?
>
> Thanks,
> Christopher Brown
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


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


Mime
View raw message