Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
7fa136ba
Commit
7fa136ba
authored
Dec 18, 2011
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor build process
parent
0c336901
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
125 deletions
+105
-125
.gitignore
.gitignore
+0
-1
build.properties
build.properties
+19
-0
build.properties.dev
build.properties.dev
+0
-16
build.xml
build.xml
+86
-108
No files found.
.gitignore
View file @
7fa136ba
build.properties
build/
logs/
reports/
...
...
build.properties
0 → 100644
View file @
7fa136ba
;
Project
Name
project.name
=
DoctrineDBAL
;
Build
and
Distribution
directories
build.dir
=
build
dist.dir
=
dist
;
Where
the
Pirum
files
should
be
stored
to
project.pirum_dir
=
;
Where
the
generated
download
file
should
be
pushed
to
project.download_dir
=
;
Dependency
minimum
versions
dependencies.common
=
2.0.1
dependencies.sfconsole
=
2.0.0
;
Version
class
and
file
project.version_class
=
Doctrine
\D
BAL
\V
ersion
project.version_file
=
lib/Doctrine/DBAL/Version.php
build.properties.dev
deleted
100644 → 0
View file @
0c336901
version_name=2.0.2
stability=stable
build.dir=build
dist.dir=dist
report.dir=reports
project.pirum_dir=
project.download_dir=
log.archive.dir=logs
svn.path=/usr/bin/svn
test.phpunit_configuration_file=
test.phpunit_generate_coverage=0
test.pmd_reports=0
test.pdepend_exec=
test.phpmd_exec=
dependencies.common=2.0.1
dependencies.sfconsole=2.0.0
\ No newline at end of file
build.xml
View file @
7fa136ba
<?xml version="1.0"?>
<!--
Doctrine 2 build file.
-->
<project
name=
"Doctrine DBAL"
default=
"build"
basedir=
"."
>
<project
name=
"DoctrineDBAL"
default=
"build"
basedir=
"."
>
<taskdef
classname=
"phing.tasks.ext.d51PearPkg2Task"
name=
"d51pearpkg2"
/>
<property
file=
"build.properties"
/>
...
...
@@ -54,7 +49,6 @@
<delete
dir=
"${build.dir}"
includeemptydirs=
"true"
/>
<delete
dir=
"${dist.dir}"
includeemptydirs=
"true"
/>
<delete
dir=
"${report.dir}"
includeemptydirs=
"true"
/>
</target>
<!--
...
...
@@ -63,83 +57,43 @@
<target
name=
"prepare"
depends=
"clean"
>
<echo
msg=
"Creating build directory: ${build.dir}"
/>
<mkdir
dir=
"${build.dir}"
/>
<mkdir
dir=
"${build.dir}/logs"
/>
<echo
msg=
"Creating distribution directory: ${dist.dir}"
/>
<mkdir
dir=
"${dist.dir}"
/>
<echo
msg=
"Creating report directory: ${report.dir}"
/>
<mkdir
dir=
"${report.dir}"
/>
<mkdir
dir=
"${build.dir}/logs"
/>
<mkdir
dir=
"${report.dir}/tests"
/>
<exec
command=
"php -r "include '${project.basedir}/${project.version_file}';echo ${project.version_class}::VERSION;""
outputProperty=
"version"
/>
<exec
command=
"php -r "echo stripos('${version}', 'beta') ? 'beta' : stripos('${version}', 'alpha') ? 'alpha' : stripos('${version}', 'dev') ? 'devel' : 'stable';""
outputProperty=
"pear.stability"
/>
<!-- Guessing the Stability for PEAR from the version -->
<exec
command=
"php -r "\$data = json_decode(file_get_contents('composer.json'), true); \$ret = (isset(\$data['version']) && \$data['version'] != '${version}') ? 1 : 0;exit(\$ret);""
checkreturn=
"true"
passthru=
"true"
/>
<!-- We need an extra PEAR version, as pear versions dont allow dashes and need to be DEVEL not DEV" -->
<exec
command=
"php -r "echo strtolower(str_replace(array('-DEV', '-'), array('DEVEL', ''), '${version}'));""
outputProperty=
"pear.version"
/>
<echo
msg=
"Preparing release of version ${version} (${pear.version}+${pear.stability})"
/>
</target>
<!--
Builds DBAL package, preparing it for distribution.
-->
<target
name=
"build-dbal"
depends=
"prepare"
>
<exec
command=
"grep '${version}' ${project.basedir}/lib/Doctrine/DBAL/Version.php"
checkreturn=
"true"
/>
<copy
todir=
"${build.dir}/doctrine-dbal"
>
<target
name=
"copy-files"
depends=
"prepare"
>
<echo
msg=
"Checking for ${version} in ${project.version_file}"
/>
<exec
command=
"grep '${version}' ${project.basedir}/${project.version_file}"
checkreturn=
"true"
/>
<copy
todir=
"${build.dir}/${project.name}-${version}"
>
<fileset
refid=
"shared-artifacts"
/>
</copy>
<copy
todir=
"${build.dir}/
doctrine-dbal
"
>
<copy
todir=
"${build.dir}/
${project.name}-${version}
"
>
<fileset
refid=
"common-sources"
/>
<fileset
refid=
"dbal-sources"
/>
</copy>
<copy
todir=
"${build.dir}/
doctrine-dbal
/Doctrine"
>
<copy
todir=
"${build.dir}/
${project.name}-${version}
/Doctrine"
>
<fileset
refid=
"symfony-sources"
/>
</copy>
<copy
todir=
"${build.dir}/
doctrine-dbal
/bin"
>
<copy
todir=
"${build.dir}/
${project.name}-${version}
/bin"
>
<fileset
refid=
"bin-scripts"
/>
</copy>
<exec
command=
"sed 's/${version}-DEV/${version}/' ${build.dir}/doctrine-dbal/Doctrine/DBAL/Version.php > ${build.dir}/doctrine-dbal/Doctrine/DBAL/Version2.php"
passthru=
"true"
/>
<exec
command=
"mv ${build.dir}/doctrine-dbal/Doctrine/DBAL/Version2.php ${build.dir}/doctrine-dbal/Doctrine/DBAL/Version.php"
passthru=
"true"
/>
</target>
<target
name=
"build"
depends=
"test,build-dbal"
/>
<!--
Runs the full test suite.
-->
<target
name=
"test"
depends=
"prepare"
>
<if><equals
arg1=
"${test.phpunit_generate_coverage}"
arg2=
"1"
/>
<then>
<property
name=
"test.phpunit_coverage_option"
value=
"--coverage-clover ${build.dir}/logs/clover.xml"
/>
</then>
<else>
<property
name=
"test.phpunit_coverage_option"
value=
""
/>
</else>
</if>
<if><equals
arg1=
"${test.phpunit_configuration_file}"
arg2=
""
/>
<then>
<property
name=
"test.phpunit_configuration_option"
value=
""
/>
</then>
<else>
<property
name=
"test.phpunit_configuration_option"
value=
"--configuration ${test.phpunit_configuration_file}"
/>
</else>
</if>
<exec
command=
"phpunit ${test.phpunit_configuration_option} ${test.phpunit_coverage_option} --log-junit ../${build.dir}/logs/testsuites.xml Doctrine/Tests/AllTests.php"
dir=
"./tests"
/>
<phpunitreport
infile=
"${build.dir}/logs/testsuites.xml"
format=
"frames"
todir=
"${report.dir}/tests"
/>
<tstamp/>
<copy
file=
"${build.dir}/logs/testsuites.xml"
tofile=
"${log.archive.dir}/latest/log.xml"
overwrite=
"true"
/>
<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"
/>
<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"
/>
</then>
</if>
</target>
<!--
Builds distributable PEAR packages.
-->
<target
name=
"build-packages"
depends=
"build-dbal"
>
<d51pearpkg2
baseinstalldir=
"/"
dir=
"${build.dir}/doctrine-dbal"
>
<name>
DoctrineDBAL
</name>
<target
name=
"define-pear-package"
depends=
"copy-files"
>
<d51pearpkg2
baseinstalldir=
"/"
dir=
"${build.dir}/${project.name}-${version}"
>
<name>
${project.name}
</name>
<summary>
Doctrine Database Abstraction Layer
</summary>
<channel>
pear.doctrine-project.org
</channel>
<description>
The Doctrine DBAL package is the database abstraction layer used to power the ORM package.
</description>
...
...
@@ -148,15 +102,14 @@
<lead
user=
"romanb"
name=
"Roman Borschel"
email=
"roman@code-factory.org"
/>
<lead
user=
"beberlei"
name=
"Benjamin Eberlei"
email=
"kontakt@beberlei.de"
/>
<license>
LGPL
</license>
<version
release=
"${version}"
api=
"${
version}"
/>
<stability
release=
"${stability}"
api=
"${
stability}"
/>
<version
release=
"${pear.version}"
api=
"${pear.
version}"
/>
<stability
release=
"${pear.stability}"
api=
"${pear.
stability}"
/>
<notes>
-
</notes>
<dependencies>
<php
minimum_version=
"5.3.2"
/>
<pear
minimum_version=
"1.6.0"
recommended_version=
"1.6.1"
/>
<package
name=
"DoctrineCommon"
channel=
"pear.doctrine-project.org"
minimum_version=
"${dependencies.common}"
/>
<!-- Doctrine Symfony Console PEAR package is generated in ORM build.xml process -->
<package
name=
"DoctrineSymfonyConsole"
channel=
"pear.doctrine-project.org"
minimum_version=
"${dependencies.sfconsole}"
/>
<package
name=
"Console"
channel=
"pear.symfony.com"
minimum_version=
"${dependencies.sfconsole}"
/>
</dependencies>
<dirroles
key=
"bin"
>
script
</dirroles>
<ignore>
Doctrine/Common/
</ignore>
...
...
@@ -166,9 +119,13 @@
<install
as=
"doctrine-dbal.php"
name=
"bin/doctrine-dbal.php"
/>
</release>
</d51pearpkg2>
<exec
command=
"pear package"
dir=
"${build.dir}/doctrine-dbal"
passthru=
"true"
/>
<exec
command=
"mv DoctrineDBAL-${version}.tgz ../../dist"
dir=
"${build.dir}/doctrine-dbal"
passthru=
"true"
/>
<tar
destfile=
"dist/DoctrineDBAL-${version}-full.tar.gz"
compression=
"gzip"
basedir=
"${build.dir}"
>
</target>
<target
name=
"generate-package"
>
<exec
command=
"pear package"
dir=
"${build.dir}/${project.name}-${version}"
passthru=
"true"
/>
<echo
msg=
"Moving ${project.name}-${pear.version}.tgz"
/>
<exec
command=
"mv ${project.name}-${pear.version}.tgz ${project.basedir}/${dist.dir}/"
dir=
"${build.dir}/${project.name}-${version}"
passthru=
"true"
checkreturn=
"true"
/>
<tar
destfile=
"dist/${project.name}-${version}-full.tar.gz"
compression=
"gzip"
basedir=
"${build.dir}"
>
<fileset
dir=
"${build.dir}"
>
<include
name=
"**/**"
/>
<exclude
name=
"logs/"
/>
...
...
@@ -176,28 +133,49 @@
</tar>
</target>
<target
name=
"git-tag"
>
<exec
command=
"grep '${version}' ${project.basedir}/lib/Doctrine/DBAL/Version.php"
checkreturn=
"true"
/>
<exec
command=
"git tag -a ${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"
/>
<exec
command=
"sudo pirum add ${project.pirum_dir} ${dist.dir}/${project.name}-${version}.tgz"
dir=
"."
passthru=
"true"
/>
</target>
<target
name=
"distribute-download"
>
<copy
file=
"dist/
DoctrineDBAL
-${version}-full.tar.gz"
todir=
"${project.download_dir}"
/>
<copy
file=
"dist/
${project.name}
-${version}-full.tar.gz"
todir=
"${project.download_dir}"
/>
</target>
<target
name=
"update-dev-version"
>
<exec
command=
"grep '${version}' ${project.basedir}/lib/Doctrine/DBAL/Version.php"
checkreturn=
"true"
/>
<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/DBAL/Version.php > ${project.basedir}/lib/Doctrine/DBAL/Version2.php"
passthru=
"true"
/>
<exec
command=
"mv ${project.basedir}/lib/Doctrine/DBAL/Version2.php ${project.basedir}/lib/Doctrine/DBAL/Version.php"
passthru=
"true"
/>
<exec
command=
"git add ${project.basedir}/lib/Doctrine/DBAL/Version.php"
passthru=
"true"
/>
<exec
command=
"git commit -m 'Bump Dev Version to ${next_version}'"
passthru=
"true"
/>
<target
name=
"is-release-commit"
>
<echo
msg=
"Checking for release commit.."
/>
<exec
command=
"php -r "exit((stripos('${version}', '-DEV') !== false) ? 1 : 0);""
checkreturn=
"true"
/>
</target>
<target
name=
"release"
depends=
"git-tag,build-packages,distribute-download,pirum-release,update-dev-version"
/>
<target
name=
"build"
depends=
"define-pear-package,generate-package"
/>
<!-- Generate a release out of the current commit -->
<target
name=
"release"
depends=
"build,is-release-commit,distribute-download,pirum-release"
/>
<!-- Use this task to create a new release commit. -->
<target
name=
"make-release-commit"
depends=
"prepare"
>
<echo
msg=
"Making a release commit of ${version}"
/>
<exec
command=
"php -r "exit((stripos('${version}', '-DEV') === false) ? 1 : 0);""
checkreturn=
"true"
/>
<!-- verify version is correct -->
<exec
command=
"grep '${version}' ${project.basedir}/${project.version_file}"
checkreturn=
"true"
/>
<!-- get default version just without -dev -->
<exec
command=
"php -r "echo str_replace('-DEV', '', '${version}');""
outputProperty=
"next_version"
/>
<!-- prompt release master for new version number anyways -->
<propertyprompt
propertyName=
"next_version"
defaultValue=
"${next_version}"
promptText=
"Enter next version string (without -DEV)"
/>
<!-- put new version into the code -->
<exec
executable=
"perl"
>
<arg
value=
"-pi"
/>
<arg
value=
"-e"
/>
<arg
value=
"s/${version}/${next_version}/g"
/>
<arg
value=
"${project.basedir}/${project.version_file}"
/>
</exec>
<exec
executable=
"perl"
>
<arg
value=
"-pi"
/>
<arg
value=
"-e"
/>
<arg
value=
"s/"library"/"library;""version":"${version}",/g"
/>
<arg
value=
"composer.json"
/>
</exec>
<exec
command=
"git add ${project.basedir}/${project.version_file} ${project.basedir}/composer.json"
passthru=
"true"
/>
<exec
command=
"git commit -m 'Release ${next_version}'"
passthru=
"true"
/>
<exec
command=
"git tag -m 'Tag ${next_version}'"
passthru=
"true"
/>
</target>
</project>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment