ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Patching <buildnumber> WAS: Basedir of imported file replaced with basedir of importing f ile
Date Tue, 29 Jun 2004 15:10:06 GMT
On Tue, 29 Jun 2004, Ivan Ivanov <rambiusparkisanius@yahoo.com> wrote:

> However, you message pointed me not only a workaround
> but an obstacle or possibilty: build number in most
> cases obey some kind of formating say two-digit
> numbers even if the firs digit is zero.

This is why the manual for buildnumber explicitly points to
<propertyfile>.  Once you add this functionality as well, you are
half-way at propertyfile.

<macrodef name="my-buildnumber">
  <attribute name="file"/>
  <attribute name="property"/>
  <attribute name="format"/>
  <sequential>
    <propertyfile file="@{file}">
      <entry key="@{property}" 
             type="int" 
             operation="+" 
             default="0" 
             pattern="@{format}"/>
    </propertyfile>
  </sequential>
</macrodef>

may be the better option then.

Stefan

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


Mime
View raw message