Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (29 sloc) 2 KB

Doctrine Build Commons

This project is a base submodule for all Doctrine projects that are using a build process yet. It handles versioning, making releases and distributing them.

By the nature of phings limit capabilities we ship a bunch of additional tasks, that mimic Ants API as much as possible to allow future migration to Ant and possibly Manuel Pichlers build-commons library.

New tasks

  • ReplaceTask with options file, token, value
  • VersionIncrementTask with options property and version


  • Build - Depends on clean, prepare, generate-package
  • Clean - Clearn the directory for the next build
  • Prepare - Retrieve version from Version Class constant, also calculate PEAR version and stability automatically.
  • generate-package - Generates the PEAR package, depends on define-pear-package as "abstract task".
  • pirum-release - Use '-Dproject.pirum_dir=path' during build to push to pirum.
  • distribute-download - Use '-Dproject.download_dir=path' during build to move download file.
  • make-release-commit - This task makes a release commit by asking for the release version, sets composer.json version, the Version constant and then increments the version in the mini level and makes another commit for the next "dev".


Your build file for a build-common supported project has to look at least:

# Project Name

# Version class and file
project.version_class = Doctrine\DBAL\Version
project.version_file = lib/Doctrine/DBAL/Version.php


Git submodule this repository into your project. Currently has to be at:


Then add the following into your build.xml:

<import file="${project.basedir}/lib/vendor/doctrine-build-common/packaging.xml" />

Now define the target: define-pear-package. See Common for an example.

Create the file with the necessary details (see above).