/** * * @param type $generator * @param type $persister * @param type $otherConfig */ protected function createJsonConfig($generator, $persister, $otherConfig = array()) { $helper = new \Liip\RMT\Helpers\ComposerConfig(); $helper->setComposerFile($this->tempDir . '/composer.json'); $allConfig = array_merge($otherConfig, array('versionPersister' => $persister)); $config = \Liip\RMT\Config::create($allConfig); $helper->addRMTConfigSection($config); return $helper->getRMTConfigSection(); }
protected function execute(InputInterface $input, OutputInterface $output) { // Create the executable task inside the project home $this->getOutput()->writeln("Creation of the new executable <info>{$this->executablePath}</info>"); file_put_contents($this->executablePath, "#!/usr/bin/env php\n" . "<?php define('RMT_ROOT_DIR', __DIR__); ?>\n" . "<?php require '{$this->commandPath}'; ?>\n"); exec('chmod +x RMT'); // Create the config file $composerHelper = new \Liip\RMT\Helpers\ComposerConfig(); $composerHelper->setComposerFile($this->configPath); $composerHelper->addRMTConfigSection(\Liip\RMT\Config::create($this->getConfigData())); $this->getOutput()->writeln("Added extra/rmt section to <info>{$this->configPath}</info>"); // Confirmation $this->writeBigTitle('Success, you can start using RMT by calling <info>RMT release</info>'); $this->writeEmptyLine(); }