Google\Cloud\Dev\Release\Command\Release::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    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));
    }