ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: Reset BuildNumber
Date Mon, 04 May 2009 18:41:13 GMT
Just playing around a bit and simplified the whole thing:

<project name="test" default="test" basedir=".">
    <target name="test">
	<!-- Note: This would be your default build task -->
	<property file="version.properties"/>
	<propertyfile file="version.properties"
	    comment="Versioning file">
	    <entry key="major"
		default="1"
		type="int"
		pattern="00"/>
	    <entry key="minor"
		default="0"
		type="int"
		pattern="00"/>
	    <entry key="build.number"
		value="1"
		default="0"
		type="int"
		operation="+"
		pattern="0000"/>
	</propertyfile>
	<echo message="Now on build number ${major}.${minor}.${build.number}"/>
    </target>

    <target name="major"
	description="Increments Major">
	<propertyfile file="version.properties"
	    comment="Versioning file">
	    <entry key="major"
		value="1"
		default="0"
		type="int"
		operation="+"
		pattern="00"/>
	    <entry key="minor"
		value="0"
		default="0"
		type="int"
		operation="="
		pattern="00"/>
	    <entry key="build.number"
		value="1"
		default="1"
		type="int"
		operation="="
		pattern="0000"/>
	</propertyfile>
    </target>

    <target name="minor"
	description="Increments Minor">
	<propertyfile file="version.properties"
	    comment="Versioning file">
	    <entry key="minor"
		value="1"
		default="0"
		type="int"
		operation="+"
		pattern="00"/>
	    <entry key="build.number"
		value="1"
		default="1"
		type="int"
		operation="="
		pattern="0000"/>
	</propertyfile>
    </target>
</project>


-- 
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