make - create a package.xml from its source directory
Вернуться к: Commands available in Pyrus
Introduction
The make command is available through the developer tools. If you do not have the developer tools installed, simply run
php pyrus.phar makeand Pyrus will ask if you would like to install the developer tools. If you assent with the word yes, Pyrus will automatically download them and install them for you.
This command creates a package.xml file from a standard PEAR2 directory layout, and then optionally creates a package release.
This command looks for these standard files:
CREDITS
README
RELEASE-X.Y.Z (where X.Y.Z is the release version)
API-X.Y.Z (where X.Y.Z is the API version)
Sub-directory | Description |
---|---|
src/ | PHP files |
data/ | Data files |
test/ | Test files |
doc/ | Documentation files |
examples/ | Example files (documentation) |
scripts/ | Executable files, scripts |
www/ | Web files |
customrole/ | Custom installer role XML definition files |
customtask/ | Custom installer task XML definition files |
customcommand/ | Custom command XML definition files |
The CREDITS file must have this format:
;; comments ignored Maintainer One [handle1] <email@example.com> (role) Maintainer Two [handle2] <email@example.com> (role)
Where role is one of lead, developer, contributor, or helper.
The first line of README is used as the summary of the package, the rest is used as the description. RELEASE-X.Y.Z is used as the release notes. Pyrus will scan all release notes (such as RELEASE-1.0.0 and RELEASE-1.2.3) and use the most recent version number (1.2.3 in our example) as the version, and the contents of the file (RELEASE-1.2.3 in our example) as the release notes.
API-X.Y.Z is used as notes about the API and the version X.Y.Z is used as the API version.
--packagexmlsetup
if --packagexmlsetup or -s is specified, it should be passed the name of a file in the package base directory that is used to fine-tune the generated package.xml. This file should work with variable $package for modifying the package.xml, and $compatible for the compatible one (if present). If --packagexmlsetup is not specified, and packagexmlsetup.php exists in the package base directory, it will be used.
Here is an example packagexmlsetup.php:
<?php
$package->dependencies['required']->package['pear2.php.net/PEAR2_Autoload']->save();
$package->dependencies['required']->package['pear2.php.net/PEAR2_Exception']->save();
$package->dependencies['required']->package['pear2.php.net/PEAR2_MultiErrors']->save();
$compatible->dependencies['required']->package['pear2.php.net/PEAR2_Autoload']->save();
$compatible->dependencies['required']->package['pear2.php.net/PEAR2_Exception']->save();
$compatible->dependencies['required']->package['pear2.php.net/PEAR2_MultiErrors']->save();
?>
--nocompatible
If --nocompatible or -n option is passed in, Pyrus will not generate a package.xml that is compatible with the PEAR Installer.
--package
This option instruct the make command to pass off the finished package.xml to the package command. It accepts a comma-delimited list of file formats, and can be any of phar, tar, tgz or zip.
--stub
This option is identical to the option for the --stub option of the package command, and is ignored if --package or -p is not also specified.
--extrasetup
This option is identical to the option for the --extrasetup option of the package command, and is ignored if --package or -p is not also specified.
Вернуться к: Commands available in Pyrus