protected function execute(InputInterface $input, OutputInterface $output) { $detector = new GitFlowBranch($this->getContext()->getVCS(), GitFlowBranch::HOTFIX); if ($detector->isInTheFlow()) { throw new Exception("Detected a git flow branch. Finish it first."); } // Generate and save the new version number $generator = new SemanticGenerator(); $newVersion = $generator->generateNextVersion($this->getContext()->getParam('current-version'), Version::TYPE_PATCH); $this->getContext()->setNewVersion($newVersion); $action = new GitFlowStartHotfixAction(); $action->setContext($this->getContext()); $action->execute(); }