ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Fetzer <elstonk...@yahoo.com>
Subject Reset BuildNumber
Date Fri, 01 May 2009 15:31:50 GMT
What is the prescribed method of setting properties in a property file?  Specifically, I'm
speaking of a file that keeps track of one of the build numbers.  Here's a simple example
with what I'd like to do in it:

  <target name="main">
    <if>
      <equals arg1="${major.increment}" arg2="true"/>
      <then>
        <buildnumber file="major.number"/>
        <propertycopy name="major.number" from="build.number"/>
        <!--This would be great, but is my imagination, how would it really work?-->
        <buildnumber file="minor.number" reset="true"/>
        <propertycopy name="minor.number" from="build.number"/>
      </then>
      <else>
        <property file="major.number"/>
        <propertycopy name="major.number" from="build.number"/>
        <buildnumber file="minor.number"/>
        <propertycopy name="minor.number" from="build.number"/>
      </else>
    </if>
    <property name="full.buildnumber" value="${major.number}.${minor.number}"/>
  </target>

Thanks,
Eric


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message