ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: Propertyfile Task not updating build numbers
Date Tue, 06 Nov 2007 16:56:25 GMT
Why not use the <BuildNumber> task? It'll do exactly what you want.

BTW, once you define a property, you cannot change its value. I think
this might be your problem.

On 11/6/07, Christopher Styles <styles706@gmail.com> wrote:
> Hi,
>
> I created the two targets below to update my build and last build numbers in
> my build.properties before my build actually starts, but for some reason
> they're not updating the numbers.... The propertyfile file attribute
> specifies the name of the property file and each nested entry element
> specifies how the value of a property file key should be modified. In this
> case, the value of the keys "build.internal.number" and "last.number" are
> treated as an int and the value 1 is added upon each invocation.... These
> two targets are in my build.xml, of course, and they seem to be executing,
> but the numbers aren't getting updated in my build.properties file... Am I
> doing something wrong...??? If so, can someone please point me in the right
> direction...??? Do I need to add the optional.jar to my ant lib folder...???
>
>
> <target name="update-intbldnum">
>     <propertyfile file="build.properties">
>         <entry key="build.internal.number" type="int" operation="+"
> value="1"/>
>     </propertyfile>
> </target>
>
>   <target name="update-lastlbl">
>         <propertyfile file="build.properties">
>             <entry key="last.number" type="int" operation="+" value="1"/>
>         </propertyfile>
> </target>
>
> Thanks
>


-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message