/** * Implement execute method * * @param InputInterface $input input object to retrieve input from commandline * @param OutputInterface $output output object to perform output actions * * @return int|null|void */ protected function execute(InputInterface $input, OutputInterface $output) { $this->target = $input->getOption('path'); $this->version = $this->versionsModel->getVersion($input->getOption('joomla-version')); $this->keepInstallationFolder = $input->getOption('keep-installation-folder'); $this->check(); $this->doDownload($output); }
/** * Implement execute method * * @param InputInterface $input input object to retrieve input from commandline * @param OutputInterface $output output object to perform output actions * * @return int|null|void */ protected function execute(InputInterface $input, OutputInterface $output) { $this->target = $input->getOption('path'); $this->version = $this->versionsModel->getVersion($input->getOption('joomla-version'), filter_var($input->getOption('stable'), FILTER_VALIDATE_BOOLEAN)); $this->keepInstallationFolder = $input->getOption('keep-installation-folder'); $this->check(); $this->doDownload($output); }
public function testGetVersion() { file_put_contents($this->cacheFile, json_encode(['heads' => ['1.x' => 'http://test', '2.x' => 'http://test', 'master' => 'http://test'], 'tags' => ['1.0.0' => 'http://test/1.0.0', '1.0.1' => 'http://test/1.0.1', '1.0.2' => 'http://test/1.0.2', '1.1.0' => 'http://test/1.1.0', '1.1.1' => 'http://test/1.1.1', '1.1.2' => 'http://test/1.1.2']])); $model = new Versions($this->cacheFile); $this->assertEquals('1.1.2', array_keys($model->getVersion('1.1.*', true))[0]); $this->assertEquals('1.1.2', array_keys($model->getVersion('1.*', true))[0]); $this->assertEquals('1.0.0', array_keys($model->getVersion('1.0.0', true))[0]); $this->assertEquals('master', array_keys($model->getVersion('master', false))[0]); $this->assertEquals('http://test/1.0.2', array_values($model->getVersion('1.0.2', true))[0]); }
/** * Implement execute method * * @param InputInterface $input input object to retrieve input from commandline * @param OutputInterface $output output object to perform output actions * * @return int|null|void */ protected function execute(InputInterface $input, OutputInterface $output) { $this->version = $this->versionsModel->getVersion($input->getOption('joomla-version'), filter_var($input->getOption('stable'), FILTER_VALIDATE_BOOLEAN)); $this->dbname = $input->getOption('dbname'); $this->dbuser = $input->getOption('dbuser'); $this->dbpassword = $input->getOption('dbpass'); $this->dbhost = $input->getOption('dbhost'); $this->dbprefix = $input->getOption('dbprefix'); $this->target = sys_get_temp_dir() . '/' . uniqid('Joomla-cli'); $this->installSampleData = $input->getOption('install-sample-data'); $this->check($input); $this->doInstallDb($output); }