Skip to content

Commit

Permalink
#66 #72 #73 AssertBackardsCompatible no longer fetches latest relea…
Browse files Browse the repository at this point in the history
…se from empty `git tag` list
  • Loading branch information
Ocramius committed May 28, 2018
1 parent c0a863f commit a07f172
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Command/AssertBackwardsCompatible.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,16 @@ private function determineFromRevisionFromRepository(
CheckedOutRepository $repository,
OutputInterface $output
) : Revision {
$versionString = $this->pickFromVersion->forVersions(
$this->getVersions->fromRepository($repository)
)->getVersionString();
$versions = $this->getVersions->fromRepository($repository);

Assert
::that($versions->count())
->greaterThan(0, 'Could not detect any released versions for the given repository');

$versionString = $this->pickFromVersion->forVersions($versions)->getVersionString();

$output->writeln(sprintf('Detected last minor version: %s', $versionString));

return $this->parseRevision->fromStringForRepository(
$versionString,
$repository
Expand Down

0 comments on commit a07f172

Please sign in to comment.