Skip to content

Commit

Permalink
ignore new majors when computing future release branches
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Lockett <[email protected]>
  • Loading branch information
Gary Lockett committed Sep 15, 2022
1 parent 5ac88fd commit 45e0195
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 26 deletions.
13 changes: 13 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,18 @@
"psr-4": {
"Laminas\\AutomaticReleases\\Test\\Unit\\": "test/unit"
}
},
"scripts": {
"check": [
"@cs-check",
"@static-analysis",
"@test"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"static-analysis": "psalm --shepherd --stats",
"update-baseline": "psalm --update-baseline",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
}
}
50 changes: 25 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/Git/Value/MergeTargetCandidateBranches.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ public function newestFutureReleaseBranchAfter(SemVerVersion $version): BranchNa
$futureReleaseBranch = Vec\filter(
Vec\reverse($this->sortedBranches),
static function (BranchName $branch) use ($nextMinor): bool {
return $nextMinor->lessThanEqual($branch->targetMinorReleaseVersion());
$targetVersion = $branch->targetMinorReleaseVersion();

return ! $targetVersion->isNewMajorRelease() && $nextMinor->lessThanEqual($targetVersion);
},
);

Expand Down

0 comments on commit 45e0195

Please sign in to comment.