コード例 #1
0
ファイル: pantrfile.php プロジェクト: pago/pantr
 *
 * @needsRequest
 * @hidden
 */
task('config:deploy-local', function ($req) {
    if (isset($req['l'])) {
        writeAction('switch', 'to local pear channel');
        property('pear.channel', 'pear.localhost');
        property('pear.dir', __DIR__ . '/../lpear');
    }
});
/**
 * Install/remove channels and packages
 */
task('deps', function () {
    pantr::dependencies()->in('lib')->fromChannel('pear.pagosoft.com')->usePackage('util')->usePackage('cli')->usePackage('parser')->fromChannel('pear.php-tools.net')->usePackage('vfsstream', 'alpha')->fromChannel('pear.symfony-project.com')->usePackage('yaml')->sync();
});
// build process
/**
 * Create build directory
 *
 * @dependsOn clean
 */
task('build:init', function () {
    $lib = find()->prune('vfsStream')->discard('vfsStream')->prune('pear')->discard('pear')->prune('data')->discard('data')->prune('doc')->discard('doc')->prune('test')->discard('test')->prune('.*')->discard('.*')->not_name('.*')->ignore_version_control()->in('lib');
    // copy source files
    mkdirs('build/pantr');
    mirror($lib, 'build/pantr', pantr::SILENT);
    mirror(find()->in('src'), 'build/pantr', pantr::SILENT);
    // and executables
    mkdirs('build/bin');