ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: How to get a directory name
Date Mon, 31 Jan 2005 20:26:20 GMT
> From: Ninju Bohra [mailto:ninju_bohra@yahoo.com]
> Was hesitant in writing the javascript (having never
> done it yet ;-) so I perserved on the regular
> expression front and with the help of a collegue we
> came up with
> 
>     <propertyregex property="max.build.number"
>                    input="${sorted.builds}"
>                    regexp="([0-9]*)$"
>                    select="\1"/>

Just be careful that you are just selecting the last version number from
your sorted list, and that may not be the *max* build number. Most
likely <sortlist> sorts alphabetically, which is not always the same as
numerically. You should be fine if your version format sorts the same
way in either type of sort. --DD

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


Mime
View raw message