testify/build.xml

74 lines
2.3 KiB
XML
Raw Normal View History

2009-06-13 06:56:12 +00:00
<project name="TUnit" basedir="." default="help">
<property file="./properties/product.properties" prefix="product"/>
<property file="./properties/build.properties" prefix="build"/>
<property file="./properties/dir.properties" prefix="dir"/>
<target name="clean" depends="init" description="Cleans up artifacts created by the build">
<delete dir="${build.base}"/>
2009-06-14 00:18:46 +00:00
<delete file="${dir.src}/${ant.project.name}/util/Product.php"/>
2009-06-13 06:56:12 +00:00
</target>
<target name="help" depends="set-exe-suffix" description="Displays information about available targets">
<exec executable="ant${exe.suffix}" failonerror="true">
<arg value="-p"/>
</exec>
</target>
<target name="lint" depends="init" description="Scans for parse errors">
<apply executable="php">
<arg line="-l"/>
<fileset dir=".">
<include name="${dir.src}/**/*.php"/>
</fileset>
</apply>
</target>
2009-06-14 00:18:46 +00:00
<target name="manifest" depends="init, product" description="Builds the manifest file for the autoload mechanism (to ./inc/manifest.php)">
2009-06-13 06:56:12 +00:00
<exec executable="php">
<arg line="${dir.tools}/manifester.php"/>
<arg line="-d ${dir.src}/${ant.project.name}"/>
<arg line="-v ${product.version}"/>
<arg line="-p ${ant.project.name}"/>
<arg line="-o ${dir.src}/${ant.project.name}/manifest.php"/>
<arg line="-r"/>
<arg line="-b ${dir.src}"/>
</exec>
</target>
2009-06-14 00:18:46 +00:00
<target name="product" depends="init" description="Generates Product.php (product meta information)">
<exec executable="php">
<arg line="${dir.tools}/productize.php"/>
<arg line="-n ${product.name}"/>
<arg line="-v ${product.version}"/>
<arg line="-a"/>
<arg line="${product.author}"/>
<arg line="-w ${product.website}"/>
<arg line="-p ${ant.project.name}"/>
<arg line="-o ${dir.src}/${ant.project.name}/util/Product.php"/>
</exec>
</target>
2009-06-13 06:56:12 +00:00
<!--
INTERNAL TARGETS
-->
<target name="init">
<tstamp>
<format property="TIMESTAMP" pattern="yyyy-MM-dd HH:mm:ss"/>
</tstamp>
<echo level="info">Beginning build for ${product.name} ${product.version}</echo>
<echo level="info"> ${TIMESTAMP}</echo>
<echo level="info"/>
</target>
<target name="prepare-build">
<mkdir dir="${build.base}"/>
</target>
<target name="set-exe-suffix">
<condition property="exe.suffix" value=".bat" else="">
<os family="winnt"/>
</condition>
</target>
</project>