2009-06-15 00:07:07 +04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Doctrine 2 build file.
|
|
|
|
-->
|
|
|
|
|
2009-09-01 02:24:48 +04:00
|
|
|
<project name="Doctrine2" default="build" basedir=".">
|
2010-05-23 03:12:07 +04:00
|
|
|
<import file="build-dependencies.xml"/>
|
|
|
|
|
2010-05-25 19:49:33 +04:00
|
|
|
<taskdef classname="NativePhpunitTask" classpath="./tests/" name="nativephpunit" />
|
2010-05-23 03:12:07 +04:00
|
|
|
<taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
|
2009-09-01 02:24:48 +04:00
|
|
|
|
2009-06-15 00:07:07 +04:00
|
|
|
<property file="build.properties" />
|
|
|
|
|
2009-06-22 22:48:42 +04:00
|
|
|
<!--
|
|
|
|
Fileset for artifacts shared across all distributed packages.
|
|
|
|
-->
|
2009-06-15 00:07:07 +04:00
|
|
|
<fileset id="shared-artifacts" dir=".">
|
|
|
|
<include name="LICENSE"/>
|
|
|
|
</fileset>
|
2009-09-02 04:14:10 +04:00
|
|
|
|
|
|
|
<!--
|
|
|
|
Fileset for command line scripts
|
|
|
|
-->
|
|
|
|
<fileset id="bin-scripts" dir="./bin">
|
|
|
|
<include name="doctrine"/>
|
|
|
|
<include name="doctrine.php"/>
|
|
|
|
</fileset>
|
|
|
|
|
2009-06-22 22:48:42 +04:00
|
|
|
<!--
|
2010-05-23 03:12:07 +04:00
|
|
|
Fileset for the sources of the Doctrine Common dependency.
|
2009-06-22 22:48:42 +04:00
|
|
|
-->
|
2009-09-02 04:14:10 +04:00
|
|
|
<fileset id="common-sources" dir="./lib">
|
|
|
|
<include name="Doctrine/Common/**"/>
|
2009-06-15 00:07:07 +04:00
|
|
|
</fileset>
|
2009-09-02 04:14:10 +04:00
|
|
|
|
2009-06-22 22:48:42 +04:00
|
|
|
<!--
|
2010-05-23 03:12:07 +04:00
|
|
|
Fileset for the sources of the Doctrine DBAL dependency.
|
2009-06-22 22:48:42 +04:00
|
|
|
-->
|
2009-09-02 04:14:10 +04:00
|
|
|
<fileset id="dbal-sources" dir="./lib">
|
|
|
|
<include name="Doctrine/DBAL/**"/>
|
2009-06-15 00:07:07 +04:00
|
|
|
</fileset>
|
|
|
|
|
2009-06-22 22:48:42 +04:00
|
|
|
<!--
|
2010-05-23 03:12:07 +04:00
|
|
|
Fileset for the sources of the Doctrine ORM.
|
2009-06-22 22:48:42 +04:00
|
|
|
-->
|
2009-09-02 04:14:10 +04:00
|
|
|
<fileset id="orm-sources" dir="./lib">
|
|
|
|
<include name="Doctrine/ORM/**"/>
|
2009-06-15 00:07:07 +04:00
|
|
|
</fileset>
|
2009-08-31 20:21:29 +04:00
|
|
|
|
2010-05-26 04:00:17 +04:00
|
|
|
<!--
|
|
|
|
Fileset for source of the Symfony YAML and Console components.
|
|
|
|
-->
|
|
|
|
<fileset id="symfony-sources" dir="./lib/vendor">
|
|
|
|
<include name="Symfony/Components/**"/>
|
|
|
|
</fileset>
|
|
|
|
|
2009-08-31 20:21:29 +04:00
|
|
|
<!--
|
|
|
|
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"/>
|
2009-09-01 02:24:48 +04:00
|
|
|
<include name="tools/sandbox/doctrine.php"/>
|
2009-08-31 20:21:29 +04:00
|
|
|
<include name="tools/sandbox/index.php"/>
|
|
|
|
</fileset>
|
2009-06-15 00:07:07 +04:00
|
|
|
|
|
|
|
<target name="clean">
|
2010-02-07 12:31:32 +03:00
|
|
|
<available file="./build.properties" property="build_properties_exist" value="true"/>
|
|
|
|
<fail unless="build_properties_exist" message="The build.properties file is missing." />
|
|
|
|
|
2009-06-15 00:07:07 +04:00
|
|
|
<delete dir="${build.dir}" includeemptydirs="true" />
|
|
|
|
<delete dir="${dist.dir}" includeemptydirs="true" />
|
2009-06-22 22:48:42 +04:00
|
|
|
<delete dir="${report.dir}" includeemptydirs="true" />
|
2009-06-15 00:07:07 +04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="prepare" depends="clean">
|
2010-05-23 03:12:07 +04:00
|
|
|
<phingcall target="resolve-dependencies"/>
|
2009-06-22 22:48:42 +04:00
|
|
|
<echo msg="Creating build directory: ${build.dir}" />
|
2009-06-15 00:07:07 +04:00
|
|
|
<mkdir dir="${build.dir}" />
|
2009-06-22 22:48:42 +04:00
|
|
|
<echo msg="Creating distribution directory: ${dist.dir}" />
|
2009-06-15 00:07:07 +04:00
|
|
|
<mkdir dir="${dist.dir}" />
|
2009-06-22 22:48:42 +04:00
|
|
|
<echo msg="Creating report directory: ${report.dir}" />
|
|
|
|
<mkdir dir="${report.dir}" />
|
2009-09-01 12:39:37 +04:00
|
|
|
<mkdir dir="${build.dir}/logs"/>
|
|
|
|
<mkdir dir="${report.dir}/tests"/>
|
2009-06-15 00:07:07 +04:00
|
|
|
</target>
|
|
|
|
|
2009-06-22 22:48:42 +04:00
|
|
|
<!--
|
|
|
|
Builds all packages, preparing them for distribution.
|
|
|
|
-->
|
2010-05-23 03:12:07 +04:00
|
|
|
<target name="build-orm" depends="test">
|
2009-08-14 15:04:31 +04:00
|
|
|
<copy todir="${build.dir}/orm">
|
2009-06-15 00:07:07 +04:00
|
|
|
<fileset refid="shared-artifacts"/>
|
2009-09-02 04:14:10 +04:00
|
|
|
<fileset refid="orm-tools"/>
|
|
|
|
</copy>
|
2010-05-26 04:00:17 +04:00
|
|
|
<copy todir="${build.dir}/orm">
|
2009-06-15 00:07:07 +04:00
|
|
|
<fileset refid="common-sources"/>
|
|
|
|
<fileset refid="dbal-sources"/>
|
|
|
|
<fileset refid="orm-sources"/>
|
2009-09-02 04:14:10 +04:00
|
|
|
</copy>
|
2010-05-26 04:00:17 +04:00
|
|
|
<copy todir="${build.dir}/orm/Doctrine">
|
|
|
|
<fileset refid="symfony-sources"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${build.dir}/orm/bin">
|
2009-09-02 04:14:10 +04:00
|
|
|
<fileset refid="bin-scripts"/>
|
2009-06-15 00:07:07 +04:00
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
2009-09-01 02:24:48 +04:00
|
|
|
<target name="build" depends="test, build-orm"/>
|
2009-06-22 22:48:42 +04:00
|
|
|
|
|
|
|
<!--
|
|
|
|
Runs the full test suite.
|
|
|
|
-->
|
2009-09-01 12:39:37 +04:00
|
|
|
<target name="test" depends="prepare">
|
2010-05-23 03:12:07 +04:00
|
|
|
|
2010-02-07 12:31:32 +03:00
|
|
|
<if><equals arg1="${test.phpunit_generate_coverage}" arg2="1" />
|
|
|
|
<then>
|
|
|
|
<property name="test.phpunit_coverage_file" value="${build.dir}/logs/clover.xml" />
|
|
|
|
</then>
|
|
|
|
<else>
|
|
|
|
<property name="test.phpunit_coverage_file" value="false" />
|
|
|
|
</else>
|
|
|
|
</if>
|
2010-05-23 03:12:07 +04:00
|
|
|
|
2010-02-07 02:19:11 +03:00
|
|
|
<nativephpunit
|
|
|
|
testfile="./tests/Doctrine/Tests/AllTests.php" junitlogfile="${build.dir}/logs/testsuites.xml"
|
2010-02-07 12:31:32 +03:00
|
|
|
testdirectory="./tests" coverageclover="${test.phpunit_coverage_file}" configuration="${test.phpunit_configuration_file}"
|
2010-02-07 02:19:11 +03:00
|
|
|
/>
|
2009-09-01 12:39:37 +04:00
|
|
|
<phpunitreport infile="${build.dir}/logs/testsuites.xml" format="frames" todir="${report.dir}/tests" />
|
2010-02-07 02:19:11 +03:00
|
|
|
|
|
|
|
<nativephpunit testfile="./tests/Doctrine/Tests/ORM/Performance/AllTests.php" testdirectory="./tests" haltonfailure="false" haltonerror="false" />
|
2009-09-19 16:10:59 +04:00
|
|
|
<tstamp/>
|
2010-04-27 22:11:42 +04:00
|
|
|
<!--<svnlastrevision svnpath="${svn.path}" workingcopy="." propertyname="svn.lastrevision"/>-->
|
|
|
|
<copy file="${build.dir}/logs/testsuites.xml" tofile="${log.archive.dir}/latest/log.xml" overwrite="true"/>
|
2010-02-07 13:04:17 +03:00
|
|
|
|
|
|
|
<if><equals arg1="${test.pmd_reports}" arg2="1" />
|
|
|
|
<then>
|
|
|
|
<exec command="${test.pdepend_exec} --jdepend-xml=${build.dir}/logs/jdepend.xml ./lib/Doctrine" />
|
|
|
|
<exec command="${test.phpmd_exec} ./lib/Doctrine xml codesize --reportfile ${build.dir}/logs/phpmd.xml" />
|
|
|
|
|
2010-04-27 22:11:42 +04:00
|
|
|
<copy file="${build.dir}/logs/jdepend.xml" tofile="${log.archive.dir}/latest/jdepend.xml" overwrite="true"/>
|
|
|
|
<copy file="${build.dir}/logs/phpmd.xml" tofile="${log.archive.dir}/latest/phpmd.xml" overwrite="true"/>
|
2010-02-07 13:04:17 +03:00
|
|
|
</then>
|
|
|
|
</if>
|
2009-06-15 00:07:07 +04:00
|
|
|
</target>
|
|
|
|
|
2009-09-01 12:39:37 +04:00
|
|
|
<!--
|
|
|
|
Builds distributable PEAR packages.
|
|
|
|
-->
|
2009-09-02 04:14:10 +04:00
|
|
|
<target name="build-packages" depends="build-orm">
|
|
|
|
|
2010-05-25 23:52:13 +04:00
|
|
|
<d51pearpkg2 baseinstalldir="/" dir="${build.dir}/orm">
|
2009-09-02 04:14:10 +04:00
|
|
|
<name>DoctrineORM</name>
|
2010-05-26 00:17:37 +04:00
|
|
|
<summary>Doctrine Object Relational Mapper</summary>
|
2010-04-28 01:18:28 +04:00
|
|
|
<channel>pear.doctrine-project.org</channel>
|
2009-09-02 04:14:10 +04:00
|
|
|
<description>The Doctrine ORM package is the primary package containing the object relational mapper.</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>
|
2010-05-26 04:00:17 +04:00
|
|
|
<dirroles key="bin">script</dirroles>
|
|
|
|
<replacement path="bin/doctrine" type="pear-config" from="@php_bin@" to="php_bin" />
|
|
|
|
<replacement path="bin/doctrine.php" type="pear-config" from="@php_bin@" to="php_bin" />
|
|
|
|
<replacement path="bin/doctrine.php" type="pear-config" from="@bin_dir@" to="bin_dir" />
|
2009-09-02 04:14:10 +04:00
|
|
|
<release>
|
2010-05-26 04:00:17 +04:00
|
|
|
<install as="doctrine" name="bin/doctrine" />
|
|
|
|
<install as="doctrine.php" name="bin/doctrine.php" />
|
2009-09-02 04:14:10 +04:00
|
|
|
</release>
|
|
|
|
</d51pearpkg2>
|
2010-05-26 04:00:17 +04:00
|
|
|
<exec command="pear package" dir="${build.dir}/orm" passthru="true" />
|
2010-05-26 07:15:16 +04:00
|
|
|
<exec command="cp DoctrineORM-${version}.tgz ../../dist" dir="${build.dir}/orm" passthru="true" />
|
|
|
|
<!--<tar destfile="${dist.dir}/DoctrineORM-${version}.tgz" basedir="${build.dir}/orm" compression="gzip" />-->
|
2009-06-15 00:07:07 +04:00
|
|
|
</target>
|
2010-05-23 03:12:07 +04:00
|
|
|
|
2010-02-07 03:13:22 +03:00
|
|
|
</project>
|