$dir = new Dir(__DIR__ . DIRECTORY_SEPARATOR); $root = $dir->up(); if ($workingTree->equals($root)) { $dist = $root->getFile('dist/psc-cms.phar.gz'); $lastMessage = exec('git log -n 1 --format=%s'); $updateComposer = 'composer update --prefer-dist --dev'; $buildPhar = $root->getFile('bin/cli') . ' build-phar'; $cd = 'cd ' . $root; $ammend = 'git commit -m"' . $lastMessage . '" --amend -o ' . $dist . ' composer.lock '; system($cd . ' && ' . $updateComposer . ' && ' . $buildPhar . ' && ' . $ammend); return 0; } throw new Exception($workingTree . ' is not registered as hook script'); }); $createCommand('composer:update', array(), function ($input, $output, $command) { system('cd ' . $command->getProject()->getSrc() . ' &&php ' . \Psc\PSC::getRoot()->getFile('composer.phar') . ' update'); }); $createCommand('test-configuration', array(), function ($input, $output, $command) { $cfgTest = new ConfigurationTester(); $cfgTest->INI('mbstring.internal_encoding', 'UTF-8'); $cfgTest->INI('post_max_size', '30M', '>='); $cfgTest->INI('upload_max_filesize', '30M', '>='); $cfgTest->INI('memory_limit', '200M', '>='); $cfgTest->INI('suhosin.memory_limit', '200M', '>='); $cfgTest->INI('display_errors', TRUE); // curl needs to be installed // mb_string needs to be installed $output->writeln((string) $cfgTest); }); $createCommand('compile:jqx-widget-specification', array($arg('html-table-file', 'Die Datei in der das HTMl für table.documentation-table ist'), $arg('widgetName', 'Der Name des Widgets ohne jq davor')), function ($input, $output, $command) { $argFile = File::factory($input->getArgument('html-table-file'));
public function getLibsPath() { if (!isset($this->libsPath)) { $this->libsPath = PSC::getRoot(); } return $this->libsPath; }