Skip to content
This repository
Browse code

Backport build-common into Common 2.1.x

  • Loading branch information...
commit f78df1166ce28ceb38df4b43cb967137ae538cf4 1 parent 441d276
Benjamin Eberlei beberlei authored
3  .gitmodules
... ... @@ -0,0 +1,3 @@
  1 +[submodule "lib/vendor/doctrine-build-common"]
  2 + path = lib/vendor/doctrine-build-common
  3 + url = git://github.com/doctrine/doctrine-build-common.git
14 build.properties.dev
... ... @@ -1,14 +0,0 @@
1   -version=2.0.0BETA2
2   -stability=beta
3   -build.dir=build
4   -dist.dir=dist
5   -report.dir=reports
6   -log.archive.dir=logs
7   -svn.path=/usr/bin/svn
8   -test.phpunit_configuration_file=
9   -test.phpunit_generate_coverage=0
10   -test.pmd_reports=0
11   -test.pdepend_exec=
12   -test.phpmd_exec=
13   -project.pirum_dir=
14   -project.download_dir=
117 build.xml
... ... @@ -1,11 +1,7 @@
1 1 <?xml version="1.0"?>
2   -
3   -<!--
4   - Doctrine 2 build file.
5   --->
6   -
7 2 <project name="Doctrine2" default="build" basedir=".">
8 3 <taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
  4 + <import file="${project.basedir}/lib/vendor/doctrine-build-common/packaging.xml" />
9 5
10 6 <property file="build.properties" />
11 7
@@ -26,83 +22,22 @@
26 22 </fileset>
27 23
28 24 <!--
29   - Clean the directory for the next build.
30   - -->
31   - <target name="clean">
32   - <available file="./build.properties" property="build_properties_exist" value="true"/>
33   - <fail unless="build_properties_exist" message="The build.properties file is missing." />
34   -
35   - <delete dir="${build.dir}" includeemptydirs="true" />
36   - <delete dir="${dist.dir}" includeemptydirs="true" />
37   - <delete dir="${report.dir}" includeemptydirs="true" />
38   - </target>
39   -
40   - <!--
41   - Prepare the new build directories after cleaning
42   - -->
43   - <target name="prepare" depends="clean">
44   - <echo msg="Creating build directory: ${build.dir}" />
45   - <mkdir dir="${build.dir}" />
46   - <echo msg="Creating distribution directory: ${dist.dir}" />
47   - <mkdir dir="${dist.dir}" />
48   - <echo msg="Creating report directory: ${report.dir}" />
49   - <mkdir dir="${report.dir}" />
50   - <mkdir dir="${build.dir}/logs"/>
51   - <mkdir dir="${report.dir}/tests"/>
52   - </target>
53   -
54   - <!--
55 25 Builds Common package, preparing it for distribution.
56 26 -->
57   - <target name="build-common">
58   - <copy todir="${build.dir}/common">
  27 + <target name="copy-files" depends="prepare">
  28 + <copy todir="${build.dir}/${project.name}-${version}">
59 29 <fileset refid="shared-artifacts"/>
60 30 </copy>
61   - <copy todir="${build.dir}/common">
  31 + <copy todir="${build.dir}/${project.name}-${version}">
62 32 <fileset refid="common-sources"/>
63 33 </copy>
64 34 </target>
65 35
66   - <target name="build" depends="prepare,build-common"/>
67   -
68   - <!--
69   - Runs the full test suite.
70   - -->
71   - <target name="test" depends="prepare">
72   - <if><equals arg1="${test.phpunit_generate_coverage}" arg2="1" />
73   - <then>
74   - <property name="test.phpunit_coverage_file" value="${build.dir}/logs/clover.xml" />
75   - </then>
76   - <else>
77   - <property name="test.phpunit_coverage_file" value="false" />
78   - </else>
79   - </if>
80   -
81   - <nativephpunit
82   - testfile="./tests/Doctrine/Tests/AllTests.php" junitlogfile="${build.dir}/logs/testsuites.xml"
83   - testdirectory="./tests" coverageclover="${test.phpunit_coverage_file}" configuration="${test.phpunit_configuration_file}"
84   - />
85   - <phpunitreport infile="${build.dir}/logs/testsuites.xml" format="frames" todir="${report.dir}/tests" />
86   -
87   - <tstamp/>
88   - <copy file="${build.dir}/logs/testsuites.xml" tofile="${log.archive.dir}/latest/log.xml" overwrite="true"/>
89   -
90   - <if><equals arg1="${test.pmd_reports}" arg2="1" />
91   - <then>
92   - <exec command="${test.pdepend_exec} --jdepend-xml=${build.dir}/logs/jdepend.xml ./lib/Doctrine" />
93   - <exec command="${test.phpmd_exec} ./lib/Doctrine xml codesize --reportfile ${build.dir}/logs/phpmd.xml" />
94   -
95   - <copy file="${build.dir}/logs/jdepend.xml" tofile="${log.archive.dir}/latest/jdepend.xml" overwrite="true"/>
96   - <copy file="${build.dir}/logs/phpmd.xml" tofile="${log.archive.dir}/latest/phpmd.xml" overwrite="true"/>
97   - </then>
98   - </if>
99   - </target>
100   -
101 36 <!--
102 37 Builds distributable PEAR packages.
103 38 -->
104   - <target name="build-packages" depends="build">
105   - <d51pearpkg2 baseinstalldir="/" dir="${build.dir}/common">
  39 + <target name="define-pear-package" depends="copy-files">
  40 + <d51pearpkg2 baseinstalldir="/" dir="${build.dir}/${project.name}-${version}">
106 41 <name>DoctrineCommon</name>
107 42 <summary>Doctrine Common PHP Extensions</summary>
108 43 <channel>pear.doctrine-project.org</channel>
@@ -112,49 +47,13 @@
112 47 <lead user="romanb" name="Roman Borschel" email="roman@code-factory.org" />
113 48 <lead user="beberlei" name="Benjamin Eberlei" email="kontakt@beberlei.de" />
114 49 <license>LGPL</license>
115   - <version release="${version}" api="${version}" />
116   - <stability release="${stability}" api="${stability}" />
  50 + <version release="${pear.version}" api="${pear.version}" />
  51 + <stability release="${pear.stability}" api="${pear.stability}" />
117 52 <notes>-</notes>
118 53 <dependencies>
119 54 <php minimum_version="5.3.0" />
120 55 <pear minimum_version="1.6.0" recommended_version="1.6.1" />
121 56 </dependencies>
122 57 </d51pearpkg2>
123   - <exec command="pear package" dir="${build.dir}/common" passthru="true" />
124   - <exec command="mv DoctrineCommon-${version}.tgz ../../dist" dir="${build.dir}/common" passthru="true" />
125   - <tar destfile="dist/DoctrineCommon-${version}-full.tar.gz" compression="gzip" basedir="${build.dir}">
126   - <fileset dir="${build.dir}">
127   - <include name="**/**" />
128   - <exclude name="logs/" />
129   - </fileset>
130   - </tar>
131   - </target>
132   -
133   - <target name="git-tag">
134   - <exec command="grep '${version}-DEV' ${project.basedir}/lib/Doctrine/Common/Version.php" checkreturn="true"/>
135   - <exec command="sed 's/${version}-DEV/${version}/' ${project.basedir}/lib/Doctrine/Common/Version.php > ${project.basedir}/lib/Doctrine/Common/Version2.php" passthru="true" />
136   - <exec command="mv ${project.basedir}/lib/Doctrine/Common/Version2.php ${project.basedir}/lib/Doctrine/Common/Version.php" passthru="true" />
137   - <exec command="git commit -a -m 'Release ${version}'" />
138   - <exec command="git tag -m 'Tag ${version}' -a ${version}" passthru="true" />
139 58 </target>
140   -
141   - <target name="pirum-release">
142   - <exec command="sudo pirum add ${project.pirum_dir} ${project.basedir}/dist/DoctrineCommon-${version}.tgz" dir="." passthru="true" />
143   - <exec command="sudo pirum build ${project.pirum_dir}" passthru="true" />
144   - </target>
145   -
146   - <target name="distribute-download">
147   - <copy file="dist/DoctrineCommon-${version}-full.tar.gz" todir="${project.download_dir}" />
148   - </target>
149   -
150   - <target name="update-dev-version">
151   - <exec command="grep '${version}' ${project.basedir}/lib/Doctrine/Common/Version.php" checkreturn="true"/>
152   - <propertyprompt propertyName="next_version" defaultValue="${version}" promptText="Enter next version string (without -DEV)" />
153   - <exec command="sed 's/${version}/${next_version}-DEV/' ${project.basedir}/lib/Doctrine/Common/Version.php > ${project.basedir}/lib/Doctrine/Common/Version2.php" passthru="true" />
154   - <exec command="mv ${project.basedir}/lib/Doctrine/Common/Version2.php ${project.basedir}/lib/Doctrine/Common/Version.php" passthru="true" />
155   - <exec command="git add ${project.basedir}/lib/Doctrine/Common/Version.php" passthru="true" />
156   - <exec command="git commit -m 'Bump Dev Version to ${next_version}'" passthru="true" />
157   - </target>
158   -
159   - <target name="release" depends="git-tag,build-packages,distribute-download,pirum-release,update-dev-version" />
160 59 </project>
1  lib/vendor/doctrine-build-common
... ... @@ -0,0 +1 @@
  1 +Subproject commit 3bfd511fb20f6bc85d85d690d6a6dd5e441c9adc

0 comments on commit f78df11

Please sign in to comment.
Something went wrong with that request. Please try again.