ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Versioning
Date Tue, 28 May 2002 13:13:14 GMT
Try the <propertyfile> task, and maintain the incrementing fields
individually as separate properties, then "glue" them together when you read
the property file back in.

<propertyfile> supports incrementing dates and numbers (and even appending
strings if you are so inclined).

    Erik


----- Original Message -----
From: "Sayatovic, Brian" <Brian.Sayatovic@divine.com>
To: "Ant Users List (E-mail)" <ant-user@jakarta.apache.org>
Sent: Tuesday, May 28, 2002 8:47 AM
Subject: Versioning


Any tips on handling versioning?  I need to maintain a x.x.x.x.ddd
versioning scheme. The first four x's have to have a 0-15 range and the
final ddd can have any decimal value.  With this version information, I need
to:

- Append it to the jar name
- Have it available in Ant for source control labelling
- Have a target to increment the version

And I want to:

- Have it available programatically

My attempt this far is to have the values in a property file that Ant can
read and also be embedded in the Jar for reading at runtime.  But I'm having
trouble automatically incrementing the version.  I've noticed the
"BuildNumbers" tasks, as well as "Property" task.  The former only deal with
a single number (whereas I have multiple), and the latter appears to only
support arithmetic for dates, not decimal values.

My goal is to keep it as close to core/optional ant as possible.  BUt if
there is nothing else, I might look into the scripting tasks.

Any auggestions?

Regards,
Brian.

--
I stole this sig

--
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