110 lines
3.3 KiB
XML
110 lines
3.3 KiB
XML
<project name="Testify" 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}"/>
|
|
<delete file="${dir.src}/${ant.project.name}/util/Product.php"/>
|
|
</target>
|
|
|
|
<target name="doc" depends="init, set-exe-suffix, prepare-build" description="Generates source code documentation using phpDocument">
|
|
<exec executable="phpdoc${exe.suffix}" failonerror="false">
|
|
<arg value="-ti"/>
|
|
<arg value="Testify"/>
|
|
<arg value="-pp"/>
|
|
<arg value="on"/>
|
|
<arg value="-ue"/>
|
|
<arg value="on"/>
|
|
<arg value="-i"/>
|
|
<arg value="external/"/>
|
|
<arg value="-d"/>
|
|
<arg value="${dir.src}"/>
|
|
<arg value="-t"/>
|
|
<arg value="${build.base}/doc"/>
|
|
</exec>
|
|
</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>
|
|
|
|
<target name="manifest" depends="init, product" description="Builds the manifest file for the autoload mechanism (to ./inc/manifest.php)">
|
|
<exec executable="php">
|
|
<arg line="${dir.tools}/manifester.php"/>
|
|
<arg line="-d"/>
|
|
<arg line="${dir.src}/${ant.project.name}"/>
|
|
<arg line="-v"/>
|
|
<arg line="${product.version}"/>
|
|
<arg line="-p"/>
|
|
<arg line="${ant.project.name}"/>
|
|
<arg line="-o"/>
|
|
<arg line="${dir.src}/${ant.project.name}/manifest.php"/>
|
|
<arg line="-r"/>
|
|
<arg line="-b"/>
|
|
<arg line="${dir.src}"/>
|
|
<arg line="-i"/>
|
|
<arg line="${file.separator}external${file.separator}"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="product" depends="init, set-revision-number" description="Generates Product.php (product meta information)">
|
|
<exec executable="php">
|
|
<arg line="${dir.tools}/productize.php"/>
|
|
<arg line="-n"/>
|
|
<arg line="${product.name}"/>
|
|
<arg line="-v"/>
|
|
<arg line="${product.version}.${product.revision}"/>
|
|
<arg line="-a"/>
|
|
<arg line="${product.author}"/>
|
|
<arg line="-e"/>
|
|
<arg line="${product.ezc}"/>
|
|
<arg line="-w"/>
|
|
<arg line="${product.website}"/>
|
|
<arg line="-p"/>
|
|
<arg line="${ant.project.name}"/>
|
|
<arg line="-o"/>
|
|
<arg line="${dir.src}/${ant.project.name}/util/Product.php"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<!--
|
|
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>
|
|
|
|
<target name="set-revision-number">
|
|
<exec executable="svnversion" outputproperty="product.revision" failonerror="true"/>
|
|
<echo level="info">Revision number set to ${product.revision}</echo>
|
|
</target>
|
|
|
|
</project> |