From 03791310cae47ef8b8b43ac4b48c95b4e9388f82 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 12 Aug 2020 12:28:53 -0500 Subject: [PATCH 1/2] fix: when creating a new release branch and bumping the changelog version, use the next default branch, not the newest existing Signed-off-by: Matthew Weier O'Phinney --- src/Application/Command/SwitchDefaultBranchToNextMinor.php | 2 +- test/unit/Application/SwitchDefaultBranchToNextMinorTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application/Command/SwitchDefaultBranchToNextMinor.php b/src/Application/Command/SwitchDefaultBranchToNextMinor.php index ead316a9..c56990d4 100644 --- a/src/Application/Command/SwitchDefaultBranchToNextMinor.php +++ b/src/Application/Command/SwitchDefaultBranchToNextMinor.php @@ -81,7 +81,7 @@ public function execute(InputInterface $input, OutputInterface $output): int BumpAndCommitChangelogVersion::BUMP_MINOR, $repositoryPath, $releaseVersion, - $newestBranch + $nextDefaultBranch ); } diff --git a/test/unit/Application/SwitchDefaultBranchToNextMinorTest.php b/test/unit/Application/SwitchDefaultBranchToNextMinorTest.php index 1e3cc2c4..d8b16c03 100644 --- a/test/unit/Application/SwitchDefaultBranchToNextMinorTest.php +++ b/test/unit/Application/SwitchDefaultBranchToNextMinorTest.php @@ -171,7 +171,7 @@ public function testWillSwitchToNewlyCreatedDefaultBranchWhenNoNewerReleaseBranc BumpAndCommitChangelogVersion::BUMP_MINOR, $workspace, SemVerVersion::fromMilestoneName('1.2.3'), - BranchName::fromName('1.2.x') + BranchName::fromName('1.3.x') ); $this->setDefaultBranch->expects(self::once()) From c17d55343f269e1427fcbcc9b99c8aea0e0303ab Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 12 Aug 2020 12:31:07 -0500 Subject: [PATCH 2/2] docs: add changelog entry for #43 Signed-off-by: Matthew Weier O'Phinney --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a81ea1..dbaaf184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- Nothing. +- [#43](https://github.com/laminas/automatic-releases/pull/43) fixes which branch the minor changelog bump is targetted to to correctly be the next default branch. ## 1.2.0 - 2020-08-12