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 <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to