Пример #1
0
function run_create_pear_package()
{
    run_create_package_xml();
    $_root = dirname(__FILE__);
    $options = pakeYaml::loadFile($_root . '/options.yaml');
    $version = $options['version'];
    pake_replace_tokens('lib/pake/pakeApp.class.php', $_root, 'const VERSION = \'', '\';', array('1.1.DEV' => "const VERSION = '{$version}';"));
    // run packager
    try {
        pakePearTask::package_pear_package($_root . '/package.xml', $_root . '/target');
    } catch (pakeException $e) {
    }
    // cleanup
    pake_remove('package.xml', $_root);
    pake_replace_tokens('lib/pake/pakeApp.class.php', $_root, "const VERSION = '", "';", array($version => "const VERSION = '1.1.DEV';"));
    if (isset($e)) {
        throw $e;
    }
}