/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $this->currentInput = $input; $this->currentOutput = $output; // Get our necessary arguments from the input. $redmine = $this->currentInput->getArgument('redmine'); $apikey = $this->currentInput->getArgument('apikey'); $project = $this->currentInput->getArgument('project'); $this->currentOutput->writeln("<info>PROJECT: {$project}</info>"); $this->currentOutput->writeln('<info>' . str_repeat("=", strlen($project) + 9) . '</info>'); // Init redmine client and get wiki pages information. $this->redmine = new RedmineConnection($redmine, $apikey); $this->project = new Project($this->redmine, $project); $this->initDirectories(); $success = $this->initGit(); if ($success === FALSE) { return; } $this->wikiPages = $this->project->loadWikiPages(); if (empty($this->wikiPages)) { $this->currentOutput->writeln('<info>There are no wiki pages in the project.</info>'); return; } // Get the wiki index status from the file stored in the repo. $this->wikiIndex = WikiIndex::loadFromFile($this->project, $this->workingPath); // Calculating the wiki page, versions, that are needed to be added to the // repo. $this->buildWikiVersions(); // And now there is the git part. $this->updateGitRepo(); }