コード例 #1
0
 public function testStartRelease()
 {
     $version = new \Liip\RMT\Version('1.2.3');
     $this->git->expects($this->once())->method('startRelease')->with($version);
     $this->context->setParameter('new-version', $version);
     $this->action->execute();
 }
コード例 #2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $detector = new GitFlowBranch($this->getContext()->getVCS(), GitFlowBranch::RELEASE);
     if ($detector->isInTheFlow()) {
         throw new Exception("Detected a git flow branch. Finish it first.");
     }
     // Generate and save the new version number
     $increment = $this->getContext()->getInformationCollector()->getValueFor('type');
     $generator = new \Liip\RMT\Version\Generator\SemanticGenerator();
     $newVersion = $generator->generateNextVersion($this->getContext()->getParam('current-version'), $increment);
     $this->getContext()->setNewVersion($newVersion);
     $action = new GitFlowStartReleaseAction();
     $action->setContext($this->getContext());
     $action->execute();
 }