Ejemplo n.º 1
0
function run_default($task, $args)
{
    pake_echo_error('Installer is a separate tool now. Please use that');
    try {
        pake_which('mvc_install');
        pake_echo_comment('It is already installed on your system. Type: mvc_install');
    } catch (pakeException $e) {
        pake_echo_comment('I will install it for you…');
        pakePearTask::install_pear_package('midgardmvc_installer', 'pear.indeyets.pp.ru');
        pake_echo_comment('Done. To use it, type: mvc_install');
    }
}
Ejemplo n.º 2
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;
    }
}