Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 4115359dd1
Fetching contributors…

Cannot retrieve contributors at this time

executable file 150 lines (133 sloc) 5.399 kb
<?xml version="1.0" encoding="UTF-8"?>
1. 'clean' Clean old project build artefacts
2. 'checkout' Update project working copy
3. 'php-documentor' Generate api documentation
4. 'php-codesniffer' Check for coding violations.
4. 'pdepend' Code dependency information.
4. 'phpcpd' Copy-paste detection.
4. 'phpcpd' Mess detection.
5. 'phpunit' Execute unit tests, generate metrics, coverage etc.
<project name="ListFramework" default="build" basedir=".">
<property file="" />
<property name="builddir" value="${basedir}/../build" />
<target name="build" depends="clean,init,update,lint,php-documentor,php-codesniffer,pdepend,phpcpd,phpmd,phpunit" />
<!-- INIT TARGET -->
<target name="init">
<mkdir dir="${builddir}" />
<mkdir dir="${builddir}/api" />
<mkdir dir="${builddir}/charts" />
<mkdir dir="${builddir}/coverage" />
<mkdir dir="${builddir}/dist" />
<mkdir dir="${builddir}/graph" />
<mkdir dir="${builddir}/logs" />
<mkdir dir="${builddir}/phpcb" />
<buildnumber file="${basedir}/build.number"/>
<exec executable="git">
<arg line="clone git:// source" />
<target name="clean">
<delete dir="${builddir}" />
<!-- UPDATE -->
<target name="update">
<exec executable="git" dir="${basedir}"><arg line="pull" /></exec>
<!-- LINT -->
<target name="lint">
<apply executable="php" logerror="true" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="tests/**/*.php" />
<include name="src/**/*.php" />
<exclude name="tests/run/**/*.php" />
<!-- PHP-DOCUMENTOR //-i paths-to-ignore1,paths-to-ignore2-->
<target name="php-documentor" depends="init">
<exec executable="phpdoc" dir="${basedir}">
<arg line="-ue on
--target ${builddir}/api
--templatebase /usr/share/php/data/phpUnderControl/data/phpdoc/
--output HTML:Phpuc:phpuc
--directory ${basedir}/src
<target name="php-codesniffer" depends="init">
<exec executable="phpcs">
<arg line="--report=checkstyle
<!--PDEPEND -->
<target name="pdepend" depends="init">
<exec executable="pdepend" failonerror="false">
<arg line="--summary-xml=${builddir}/logs/pdepend.xml
${basedir}/src" />
<!-- PHPCPD -->
<target name="phpcpd" depends="init">
<exec executable="phpcpd" failonerror="false">
<arg line="--log-pmd ${builddir}/logs/pmd-cpd.xml
${basedir}/src" />
<!-- PHPMD -->
<target name="phpmd" depends="init">
<exec executable="phpmd" failonerror="false">
<arg line="${basedir}/src
--reportfile ${builddir}/logs/pmd.xml" />
<!-- PHPUNIT -->
<target name="phpunit">
<exec executable="phpunit" failonerror="false" dir="${basedir}/tests">
<arg line="--process-isolation
--log-junit ${builddir}/logs/junit.xml
--coverage-clover ${builddir}/logs/coverage.xml
--coverage-html ${builddir}/coverage" />
<!--Update build number, need to try this in the future. Need to see about repushing the build number into git as well
<target name="update-version">
<propertyset id="tdate"></propertyset>
<format property="tdate" pattern="yyyyMMdd"/>
<buildnumber file="build.number"/>
<echo>updating version to current datetime: ${tdate}</echo>
<replaceregexp byline="true">
<regexp pattern="public static const BUILD_DATE: String = \'([0-9]+)'"/>
<substitution expression="public static const BUILD_DATE: String = '${tdate}'"/>
<fileset dir="src/it/sephiroth/somestuff">
<include name=""/>
<replaceregexp byline="true">
<regexp pattern="public static const BUILD_NUMBER: String = \'([0-9\.]+)'"/>
<substitution expression="public static const BUILD_NUMBER: String = '${build.number}'"/>
<fileset dir="src/it/sephiroth/somestuff">
<include name=""/>
Jump to Line
Something went wrong with that request. Please try again.