选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
addArguments(array( new sfCommandArgument('name', sfCommandArgument::REQUIRED, 'The plugin name'), new sfCommandArgument('dir', sfCommandArgument::REQUIRED, 'The output dir'), )); $this->namespace = 'opPlugin'; $this->name = 'release'; $this->briefDescription = 'Creates the plugin definition file and archive the OpenPNE plugin.'; $this->detailedDescription = <<ask('Type plugin version')) || !preg_match('/^[.\d]+(alpha|beta|rc)?[.\d]*$/i', $version) ) { $this->logBlock('invalid format.', 'ERROR'); } while ( !($stability = $this->ask('Choose stability (stable, alpha, beta or devel)')) || !in_array($stability, array('stable', 'alpha', 'beta', 'devel')) ) { $this->logBlock('invalid format.', 'ERROR'); } while (!($note = $this->ask('Type release note'))); $this->logBlock('These informations are inputed:', 'COMMENT'); $this->log($this->formatList(array( 'The Plugin Name ' => $name, 'The Plugin Version ' => $version, 'The Plugin Stability' => $stability, 'The Release note ' => $note, ))); if ($this->askConfirmation('Is it OK to start this task? (y/n)')) { $this->doRelease($name, $version, $stability, $note, $dir); $this->clearCache(); } } protected function doRelease($name, $version, $stability, $note, $dir) { $defineTask = new opPluginDefineTask($this->dispatcher, $this->formatter); $defineTask->run(array('name' => $name, 'version' => $version, 'stability' => $stability, 'note' => '"'.$note.'"')); $archiveTask = new opPluginArchiveTask($this->dispatcher, $this->formatter); $archiveTask->run(array('name' => $name, $dir)); } protected function clearCache() { $task = new sfCacheClearTask($this->dispatcher, $this->formatter); $task->run(); } protected function formatList($list) { $result = ''; foreach ($list as $key => $value) { $result .= $this->formatter->format($key, 'INFO')."\t"; $result .= $value."\n"; } return $result; } }