/** * @param string $key * @param string $type * @param string $context * @param string $branch * @return void */ public function createCommand($key, $type = 'TYPO3\\CMS\\Deploy', $context = 'Development', $branch = 'master') { $deployment = new Deployment(); $deployment->setClientIp('127.0.0.1'); try { $preset = $this->presetRepository->findByIdentifier($key); } catch (\Lightwerk\Surfcaptain\Exception $e) { $this->outputLine('cannot get preset'); $this->quit(); } $preset['applications'][0]['options']['branch'] = $branch; $preset['applications'][0]['options']['context'] = $context; $preset['applications'][0]['type'] = $type; if ($deployment->getRepository() !== NULL) { $this->deploymentRepository->add($deployment); $this->outputLine('SUCCESS: deployment created'); } else { $this->outputLine('ERROR: no repository'); } }