Skip to content

Commit 45e0195

Browse files
author
Gary Lockett
committed
ignore new majors when computing future release branches
Signed-off-by: Gary Lockett <[email protected]>
1 parent 5ac88fd commit 45e0195

File tree

3 files changed

+41
-26
lines changed

3 files changed

+41
-26
lines changed

composer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,18 @@
4848
"psr-4": {
4949
"Laminas\\AutomaticReleases\\Test\\Unit\\": "test/unit"
5050
}
51+
},
52+
"scripts": {
53+
"check": [
54+
"@cs-check",
55+
"@static-analysis",
56+
"@test"
57+
],
58+
"cs-check": "phpcs",
59+
"cs-fix": "phpcbf",
60+
"static-analysis": "psalm --shepherd --stats",
61+
"update-baseline": "psalm --update-baseline",
62+
"test": "phpunit --colors=always",
63+
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
5164
}
5265
}

composer.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Git/Value/MergeTargetCandidateBranches.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public function newestFutureReleaseBranchAfter(SemVerVersion $version): BranchNa
8282
$futureReleaseBranch = Vec\filter(
8383
Vec\reverse($this->sortedBranches),
8484
static function (BranchName $branch) use ($nextMinor): bool {
85-
return $nextMinor->lessThanEqual($branch->targetMinorReleaseVersion());
85+
$targetVersion = $branch->targetMinorReleaseVersion();
86+
87+
return ! $targetVersion->isNewMajorRelease() && $nextMinor->lessThanEqual($targetVersion);
8688
},
8789
);
8890

0 commit comments

Comments
 (0)