Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: 3.2/master
Fetching contributors…

Cannot retrieve contributors at this time

121 lines (106 sloc) 4.617 kb
<?xml version="1.0" encoding="UTF-8"?>
<project name="projecttemplate" default="help">
<property name="builddir" value="${project.basedir}/build"/>
<!-- Shows the help message -->
<target name="help">
<echo message="General Targets"/>
<echo message="==============="/>
<echo message="phing test Run unit tests."/>
<echo message="phing test-log Run unit tests with logging enabled."/>
<echo message="phing phpcs Run phpcs."/>
<echo message="phing phpcs-log Run phpcs with logging enabled."/>
<echo message="phing phpmd Run phpmd."/>
<echo message="phing phpmd-log Run phpmd with logging enabled."/>
<echo message="phing phpcpd-log Run phpcpd with logging enabled."/>
<echo message="phing pdepend-log Run pdepend with logging enabled."/>
<echo message="phing phpcb-log Run phpcb with logging enabled."/>
<echo message=""/>
<echo message="Misc Targets"/>
<echo message="============"/>
<echo message="phing ci Alias task for continuous integration servers"/>
</target>
<!-- Clean up -->
<target name="clean">
<delete dir="${builddir}"/>
<!-- Create build directories -->
<mkdir dir="${builddir}/coverage"/>
<mkdir dir="${builddir}/logs"/>
<mkdir dir="${builddir}/release"/>
<mkdir dir="${builddir}/code-browser"/>
</target>
<!-- Run unit tests -->
<target name="test">
<exec command="phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php" passthru="true"/>
</target>
<!-- Run unit tests and generate junit.xml and clover.xml -->
<target name="test-log">
<exec command="phpunit --bootstrap=modules/unittest/bootstrap.php --coverage-html=${builddir}/coverage --log-junit=${builddir}/logs/junit.xml --coverage-clover=${builddir}/logs/clover.xml modules/unittest/tests.php" passthru="true"/>
</target>
<!-- Run PHP Code Sniffer -->
<target name="phpcs">
<phpcodesniffer standard="Kohana" showSniffs="true" showWarnings="true">
<fileset dir="${project.basedir}">
<include name="**/*.php" />
<exclude name="**/vendor/**" />
</fileset>
<formatter type="default" usefile="false"/>
</phpcodesniffer>
</target>
<!-- Run PHP Code Sniffer and generate checkstyle.xml -->
<target name="phpcs-log">
<phpcodesniffer standard="Kohana" showSniffs="true" showWarnings="true">
<fileset dir="${project.basedir}">
<include name="**/*.php" />
<exclude name="**/vendor/**" />
</fileset>
<formatter type="default" usefile="false"/>
<formatter type="checkstyle" outfile="${builddir}/logs/checkstyle.xml"/>
</phpcodesniffer>
</target>
<!-- Run PHP Mess Detector -->
<target name="phpmd">
<exec command="phpmd ${project.basedir} text codesize,unusedcode --exclude=**/vendor/**" passthru="true"/>
</target>
<!-- Run PHP Mess Detector and generate pmd.xml -->
<target name="phpmd-log">
<exec command="phpmd ${project.basedir} xml codesize,unusedcode --exclude=**/vendor/** --reportfile ${builddir}/logs/pmd.xml" passthru="true"/>
</target>
<!-- Run PHP Copy/Paste Detector and generate pmd.xml -->
<target name="phpcpd-log">
<phpcpd>
<fileset dir="${project.basedir}">
<include name="**/*.php" />
<exclude name="**/vendor/**" />
</fileset>
<formatter type="pmd" outfile="${builddir}/logs/pmd-cpd.xml"/>
</phpcpd>
</target>
<!-- Run PHP Depend and generate jdepend.xml -->
<target name="pdepend-log">
<phpdepend>
<fileset dir="${project.basedir}">
<include name="**/*.php" />
<exclude name="**/vendor/**" />
</fileset>
<logger type="jdepend-xml" outfile="${builddir}/logs/jdepend.xml"/>
<!--<analyzer type="coderank-mode" value="method"/>-->
</phpdepend>
</target>
<!-- Run PHP CodeBrowser and generate output -->
<target name="phpcb-log">
<exec command="phpcb --log ${builddir}/logs --source ${project.basedir} --output ${builddir}/code-browser" passthru="true"/>
</target>
<!-- Hudson CI target -->
<target name="ci" depends="clean">
<phingcall target="test-log"/>
<phingcall target="pdepend-log"/>
<!-- <phingcall target="phpmd-log"/> -->
<phingcall target="phpcpd-log"/>
<phingcall target="phpcs-log"/>
<phingcall target="phpcb-log"/>
</target>
<!-- Webistrano Deploy of QA Stage -->
<target name="deploy-qa">
<exec command="ruby /usr/local/webistrano/script/deploy --description='Automatically deployed from successful build' ${phing.project.name} qa" passthru="true"/>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.