164 lines
5.8 KiB
XML
164 lines
5.8 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
Doctrine 2 build file.
|
|
-->
|
|
|
|
<project name="Doctrine2" default="build" basedir=".">
|
|
<taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
|
|
|
|
<property file="build.properties" />
|
|
|
|
<!--
|
|
Fileset for artifacts shared across all distributed packages.
|
|
-->
|
|
<fileset id="shared-artifacts" dir=".">
|
|
<include name="LICENSE"/>
|
|
<include name="COPYRIGHT"/>
|
|
<include name="CHANGELOG"/>
|
|
</fileset>
|
|
|
|
<!--
|
|
Fileset for the sources of the Doctrine Common package.
|
|
-->
|
|
<fileset id="common-sources" dir=".">
|
|
<include name="lib/Doctrine/Common/**"/>
|
|
</fileset>
|
|
|
|
<!--
|
|
Fileset for the sources of the Doctrine DBAL package.
|
|
-->
|
|
<fileset id="dbal-sources" dir=".">
|
|
<include name="lib/Doctrine/DBAL/**"/>
|
|
</fileset>
|
|
|
|
<!--
|
|
Fileset for the sources of the Doctrine ORM package.
|
|
-->
|
|
<fileset id="orm-sources" dir=".">
|
|
<include name="lib/Doctrine/ORM/**"/>
|
|
</fileset>
|
|
|
|
<!--
|
|
Fileset for the Doctrine ORM tools + sandbox.
|
|
-->
|
|
<fileset id="orm-tools" dir=".">
|
|
<include name="tools/sandbox/Entities"/>
|
|
<include name="tools/sandbox/xml"/>
|
|
<include name="tools/sandbox/yaml"/>
|
|
<include name="tools/sandbox/cli-config.php"/>
|
|
<include name="tools/sandbox/config.php"/>
|
|
<include name="tools/sandbox/doctrine"/>
|
|
<include name="tools/sandbox/doctrine.php"/>
|
|
<include name="tools/sandbox/index.php"/>
|
|
</fileset>
|
|
|
|
<target name="clean">
|
|
<delete dir="${build.dir}" includeemptydirs="true" />
|
|
<delete dir="${dist.dir}" includeemptydirs="true" />
|
|
<delete dir="${report.dir}" includeemptydirs="true" />
|
|
</target>
|
|
|
|
<target name="prepare" depends="clean">
|
|
<echo msg="Creating build directory: ${build.dir}" />
|
|
<mkdir dir="${build.dir}" />
|
|
<echo msg="Creating distribution directory: ${dist.dir}" />
|
|
<mkdir dir="${dist.dir}" />
|
|
<echo msg="Creating report directory: ${report.dir}" />
|
|
<mkdir dir="${report.dir}" />
|
|
</target>
|
|
|
|
<target name="build-common">
|
|
<copy todir="${build.dir}/common">
|
|
<fileset refid="shared-artifacts"/>
|
|
<fileset refid="common-sources"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="build-dbal">
|
|
<copy todir="${build.dir}/dbal">
|
|
<fileset refid="shared-artifacts"/>
|
|
<fileset refid="common-sources"/>
|
|
<fileset refid="dbal-sources"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<!--
|
|
Builds all packages, preparing them for distribution.
|
|
-->
|
|
<target name="build-orm" depends="prepare, build-common, build-dbal">
|
|
<copy todir="${build.dir}/orm">
|
|
<fileset refid="shared-artifacts"/>
|
|
<fileset refid="common-sources"/>
|
|
<fileset refid="dbal-sources"/>
|
|
<fileset refid="orm-sources"/>
|
|
<fileset refid="orm-tools"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="build" depends="test, build-orm"/>
|
|
|
|
<target name="prepare-test">
|
|
<mkdir dir="${build.dir}/logs"/>
|
|
<mkdir dir="${report.dir}/tests"/>
|
|
</target>
|
|
|
|
<!--
|
|
Runs the full test suite.
|
|
-->
|
|
<target name="test" depends="prepare-test">
|
|
<phpunit printsummary="true" haltonfailure="true">
|
|
<formatter todir="${build.dir}/logs" type="xml"/>
|
|
<batchtest classpath="tests">
|
|
<fileset dir="tests">
|
|
<include name="**/*Test.php"/>
|
|
</fileset>
|
|
</batchtest>
|
|
</phpunit>
|
|
<phpunitreport infile="build/logs/testsuites.xml" format="frames" todir="reports/tests" />
|
|
</target>
|
|
|
|
<target name="build-tar-packages" depends="test, build-orm">
|
|
<tar destfile="${dist.dir}/DoctrineCommon-${version_name}.tar.gz" compression="gzip">
|
|
<fileset dir="${build.dir}/common">
|
|
<include name="**" />
|
|
</fileset>
|
|
</tar>
|
|
<tar destfile="${dist.dir}/DoctrineDBAL-${version_name}.tar.gz" compression="gzip">
|
|
<fileset dir="${build.dir}/dbal">
|
|
<include name="**" />
|
|
</fileset>
|
|
</tar>
|
|
<tar destfile="${dist.dir}/DoctrineORM-${version_name}.tar.gz" compression="gzip">
|
|
<fileset dir="${build.dir}/orm">
|
|
<include name="**" />
|
|
</fileset>
|
|
</tar>
|
|
</target>
|
|
|
|
<target name="build-pear-packages" depends="test, build-orm">
|
|
<d51pearpkg2 baseinstalldir="Doctrine" dir="${build.dir}/orm">
|
|
<name>${name}</name>
|
|
<summary>${summary}</summary>
|
|
<channel>pear.phpdoctrine.org</channel>
|
|
<description>${description}</description>
|
|
<lead user="jwage" name="Jonathan H. Wage" email="jonwage@gmail.com" />
|
|
<lead user="guilhermeblanco" name="Guilherme Blanco" email="guilhermeblanco@gmail.com" />
|
|
<lead user="romanb" name="Roman Borschel" email="roman@code-factory.org" />
|
|
<license>LGPL</license>
|
|
<version release="${version}" api="${version}" />
|
|
<stability release="${stability}" api="${stability}" />
|
|
<notes>-</notes>
|
|
<dependencies>
|
|
<php minimum_version="5.3.0" />
|
|
<pear minimum_version="1.6.0" recommended_version="1.6.1" />
|
|
</dependencies>
|
|
</d51pearpkg2>
|
|
|
|
<tar destfile="${dist.dir}/DoctrineCommon-${version_name}.tgz" basedir="${build.dir}/common" compression="gzip" />
|
|
<tar destfile="${dist.dir}/DoctrineDBAL-${version_name}.tgz" basedir="${build.dir}/dbal" compression="gzip" />
|
|
<tar destfile="${dist.dir}/DoctrineORM-${version_name}.tgz" basedir="${build.dir}/orm" compression="gzip" />
|
|
</target>
|
|
|
|
<target name="build-packages" depends="test, build-pear-packages, build-tar-packages"/>
|
|
</project> |