The Phenotype development team uses phing as build system. So we can keep the SVN repository in a ordered structure and have the option to run multiple automated tasks at the time the current version is converted into a build.
There are multiple copy operations done at build time and a build number is created. This helps later to track down who made a build and upon which code base it was created.
If you intend to use the build system, you have to install phing. Phing is similar to ant, but it´s for php and doesn´t require to have all that java stuff set up.
To install phing I recommend using pear. What you have to do:\
$> pear channel-discover pear.phing.info $> pear install phing/phing
Please consider that on your machine might be multiple installations of php resulting usually in multiple pear binaries as well as in multiple extension directories. On my Mac OS X machine the solution is to address the pear binary explicitly with /usr/local/php5/bin/pear. Also pear >= 1.4.0 is required for the installation.
Phenotype uses a phing feature to automate SVN tasks, so there are 2 other libs required:
$> pear install pear/XML_Parser $> pear install channel://pear.php.net/VersionControl_SVN-0.3.1
More infos on phing you will find on the ping website
The build phenotype does via phing is controlled by the file build.xml. You will find several build targets in there and some variable definitions, where you should at least edit 1 of them. The interesting targets are:
- build: creates a directory named like the build number and builds a phenotype system in there
- dev-build: modifies the svn working directory so that you can run phenotype directly from there. This is useful for system development but you have to be very careful not to come in trouble with doublettes of files and have to know which one is in the repository and which one not. If you use this, you should know what you’re doing.
- clean: truncates the complete build directory
The property you should set in the build.xml is the buildNo. Currently, the buildNo is the svn revision number with a four-digit number as postfix, like r179-0001. The svn revision number is automatically collected through phing 1) 2), but the number you have to set manually. If you do builds that will be published, you should definitely do that and put there something senseful.
I hope this helps so far. For any questions, please use the forum as usual.
You think Phenotype Wiki/Documentation could be better?
We too. Please contribute: Edit this page
Recent Blog Posts
- Finally Multibyte - Phenotype 3.0
- Phenotype 2.9 explained
- Integration of PHPIDS (PHP-Intrusion Detection System)
- New Release: Phenotype 2.8 Ready for Download
- Restart: New Phenotype Website Live
- Phenotype worth: 2 Million $
- New Feature: Automatic Image Version Creation
- Additional smartURL variable: smartPATH