public function registerIn(PackageSpec $packageSpec) { foreach ($this->channels as $channel => $packages) { foreach ($packages as $pkg => $version) { $packageSpec->addPackageDependency($pkg, $channel); } } }
mkdirs('build/pantr'); mirror($lib, 'build/pantr', pantr::SILENT); mirror(find()->in('src'), 'build/pantr', pantr::SILENT); // and executables mkdirs('build/bin'); copy('bin/pantr', 'build/bin/pantr'); copy('bin/pantr.bat', 'build/bin/pantr.bat'); }); /** * Creates a PEAR package * * @dependsOn test, build:init * @before config:deploy-local */ task('build:package', function () { $spec = PackageSpec::in('build')->setName('pantr')->setChannel(property('pear.channel'))->setSummary('pantr is a simple php build tool.')->setDescription('pantr is a simple php build tool.')->setNotes('n/a')->setVersion(property('pantr.version'))->setStability('beta')->setLicense(PackageSpec::LICENSE_MIT)->addMaintainer('lead', 'Patrick Gotthardt', 'pago', '*****@*****.**')->setDependsOnPHPVersion('5.3.0')->addFiles(fileset()->ignore_version_control()->relative()->in('build'))->addFiles(array('bin/pantr', 'bin/pantr.bat'))->addExecutable('bin/pantr')->addExecutable('bin/pantr.bat', null, PackageSpec::PLATFORM_WIN)->createPackage('dist'); }); // compilation File::task('build:services', 'build/pantr/pantr/core/services.yml', ':dirname/:filename.php')->dependsOn('build:init')->run(function ($src, $target) { // compile dependency injection layer $sc = new \sfServiceContainerBuilder(); $loader = new \sfServiceContainerLoaderFileYaml($sc); $loader->load($src); $dumper = new \sfServiceContainerDumperPhp($sc); $code = $dumper->dump(array('class' => 'pantrContainer')); file_put_contents($target, $code); }); /** * Updates the version number in the pantr.php file * * @hidden