protected function execute(InputInterface $input, OutputInterface $output)
{
$version = $input->getArgument('version');
if (in_array(strtolower($version), $this->allowedReleaseTypes)) {
$version = $this->getNextVersionName($version);
}
try {
$validatedVersion = new version($version);
} catch (\Exception $e) {
$validatedVersion = null;
}
if (is_null($validatedVersion)) {
throw new RuntimeException(sprintf('Given version %s is not a valid version name', $version));
}
$version = (string) $validatedVersion;
$output->writeln(sprintf('Adding version %s to Documentation Manifest.', $version));
$this->addToManifest($version);
$output->writeln(sprintf('Setting ServiceBuilder version constant to %s.', $version));
$this->updateServiceBuilder($version);
$output->writeln(sprintf('Release %s generated!', $version));
}