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
|
|
|
|
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" />
|
2010-05-26 19:47:01 +04:00
|
|
|
|
|
|
|
<!--
|
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>
|
|
|
|
|
2010-05-26 19:47:01 +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
|
|
|
-->
|
2010-05-26 19:56:43 +04:00
|
|
|
<fileset id="common-sources" dir="./lib/vendor/doctrine-common/lib">
|
2009-09-02 04:14:10 +04:00
|
|
|
<include name="Doctrine/Common/**"/>
|
2009-06-15 00:07:07 +04:00
|
|
|
</fileset>
|
2009-09-02 04:14:10 +04:00
|
|
|
|
2010-05-26 19:47:01 +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
|
|
|
-->
|
2010-05-26 19:56:43 +04:00
|
|
|
<fileset id="dbal-sources" dir="./lib/vendor/doctrine-dbal/lib">
|
2009-09-02 04:14:10 +04:00
|
|
|
<include name="Doctrine/DBAL/**"/>
|
2009-06-15 00:07:07 +04:00
|
|
|
</fileset>
|
2010-05-26 19:47:01 +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>
|
2010-05-26 19:47:01 +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">
|
2010-08-31 01:35:54 +04:00
|
|
|
<include name="Symfony/Component/**"/>
|
2010-05-26 04:00:17 +04:00
|
|
|
</fileset>
|
2010-05-26 19:47:01 +04:00
|
|
|
|
|
|
|
<!--
|
|
|
|
Clean the directory for the next build.
|
|
|
|
-->
|
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>
|
|
|
|
|
2010-05-26 19:47:01 +04:00
|
|
|
<!--
|
|
|
|
Prepare the new build directories after cleaning
|
|
|
|
-->
|
2009-06-15 00:07:07 +04:00
|
|
|
<target name="prepare" depends="clean">
|
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>
|
2010-05-26 19:47:01 +04:00
|
|
|
|
|
|
|
<!--
|
|
|
|
Builds ORM package, preparing it for distribution.
|
2009-06-22 22:48:42 +04:00
|
|
|
-->
|
2010-05-23 03:12:07 +04:00
|
|
|
<target name="build-orm" depends="test">
|
2010-08-31 01:35:54 +04:00
|
|
|
<copy todir="${build.dir}/doctrine-orm">
|
2009-06-15 00:07:07 +04:00
|
|
|
<fileset refid="shared-artifacts"/>
|
2009-09-02 04:14:10 +04:00
|
|
|
</copy>
|
2010-08-31 01:35:54 +04:00
|
|
|
<copy todir="${build.dir}/doctrine-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-08-31 01:35:54 +04:00
|
|
|
<copy todir="${build.dir}/doctrine-orm/Doctrine">
|
2010-05-26 04:00:17 +04:00
|
|
|
<fileset refid="symfony-sources"/>
|
|
|
|
</copy>
|
2010-08-31 01:35:54 +04:00
|
|
|
<copy todir="${build.dir}/doctrine-orm/bin">
|
2009-09-02 04:14:10 +04:00
|
|
|
<fileset refid="bin-scripts"/>
|
2009-06-15 00:07:07 +04:00
|
|
|
</copy>
|
2010-08-31 01:35:54 +04:00
|
|
|
<exec command="sed 's/${version}-DEV/${version}/' ${build.dir}/doctrine-orm/Doctrine/ORM/Version.php > ${build.dir}/doctrine-orm/Doctrine/ORM/Version2.php" passthru="true" />
|
|
|
|
<exec command="mv ${build.dir}/doctrine-orm/Doctrine/ORM/Version2.php ${build.dir}/doctrine-orm/Doctrine/ORM/Version.php" passthru="true" />
|
2009-06-15 00:07:07 +04:00
|
|
|
</target>
|
2010-05-26 19:47:01 +04:00
|
|
|
|
2009-09-01 02:24:48 +04:00
|
|
|
<target name="build" depends="test, build-orm"/>
|
2010-05-26 19:47:01 +04:00
|
|
|
|
|
|
|
<!--
|
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-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-26 19:47:01 +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
|
|
|
<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>
|
|
|
|
|
2010-05-26 19:47:01 +04:00
|
|
|
<!--
|
2009-09-01 12:39:37 +04:00
|
|
|
Builds distributable PEAR packages.
|
|
|
|
-->
|
2010-12-04 12:59:14 +03:00
|
|
|
<target name="build-packages" depends="build-orm">
|
2010-08-31 01:35:54 +04:00
|
|
|
<d51pearpkg2 baseinstalldir="/" dir="${build.dir}/doctrine-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" />
|
2010-08-31 01:35:54 +04:00
|
|
|
<lead user="beberlei" name="Benjamin Eberlei" email="kontakt@beberlei.de" />
|
2009-09-02 04:14:10 +04:00
|
|
|
<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" />
|
2010-08-31 01:35:54 +04:00
|
|
|
<package name="DoctrineCommon" channel="pear.doctrine-project.org" minimum_version="${dependencies.common}" />
|
|
|
|
<package name="DoctrineDBAL" channel="pear.doctrine-project.org" minimum_version="${dependencies.dbal}" />
|
2009-09-02 04:14:10 +04:00
|
|
|
</dependencies>
|
2010-05-26 04:00:17 +04:00
|
|
|
<dirroles key="bin">script</dirroles>
|
2010-08-31 01:35:54 +04:00
|
|
|
<ignore>Doctrine/Common/</ignore>
|
|
|
|
<ignore>Doctrine/DBAL/</ignore>
|
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" />
|
2010-09-30 22:57:14 +04:00
|
|
|
<install as="doctrine.bat" name="bin/doctrine.bat" />
|
2009-09-02 04:14:10 +04:00
|
|
|
</release>
|
|
|
|
</d51pearpkg2>
|
2010-08-31 01:35:54 +04:00
|
|
|
<exec command="pear package" dir="${build.dir}/doctrine-orm" passthru="true" />
|
|
|
|
<exec command="mv DoctrineORM-${version}.tgz ../../dist" dir="${build.dir}/doctrine-orm" passthru="true" />
|
|
|
|
<tar destfile="dist/DoctrineORM-${version}-full.tar.gz" compression="gzip" basedir="${build.dir}">
|
|
|
|
<fileset dir="${build.dir}">
|
|
|
|
<include name="**/**" />
|
|
|
|
<exclude name="logs/" />
|
|
|
|
<exclude name="doctrine-orm/package.xml" />
|
|
|
|
</fileset>
|
|
|
|
</tar>
|
2009-06-15 00:07:07 +04:00
|
|
|
</target>
|
2010-12-04 12:59:14 +03:00
|
|
|
|
|
|
|
<target name="git-tag">
|
|
|
|
<exec command="git tag -a ${version}" passthru="true" />
|
|
|
|
<exec command="git push origin ${version}" passthru="true" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="pirum-release">
|
|
|
|
<exec command="sudo pirum add ${project.pirum_dir} ${project.basedir}/dist/DoctrineDBAL-${version}.tgz" dir="." passthru="true" />
|
|
|
|
<exec command="sudo pirum build ${project.pirum_dir}" passthru="true" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="distribute-download">
|
|
|
|
<copy file="dist/DoctrineORM-${version}-full.tar.gz" todir="${project.download_dir}" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="update-dev-version">
|
|
|
|
<propertyprompt propertyName="next_version" defaultValue="${version}" promptText="Enter next version string (without -DEV)" />
|
|
|
|
<exec command="sed 's/${version}-DEV/${next_version}-DEV/' ${project.basedir}/lib/Doctrine/ORM/Version.php > ${project.basedir}/lib/Doctrine/ORM/Version2.php" passthru="true" />
|
|
|
|
<exec command="mv ${project.basedir}/lib/Doctrine/ORM/Version2.php ${project.basedir}/lib/Doctrine/ORM/Version.php" passthru="true" />
|
|
|
|
<exec command="git add ${project.basedir}/lib/Doctrine/ORM/Version.php" passthru="true" />
|
|
|
|
<exec command="git commit -m 'Bump Dev Version to ${next_version}-DEV'" passthru="true" />
|
|
|
|
<exec command="git push origin master" passthru="true" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="release" depends="git-tag,build-packages,distribute-download,pirum-release,update-dev-version" />
|
2010-05-26 19:47:01 +04:00
|
|
|
</project>
|