From d360aa810cd21bef48aa3940ef97aa80069f0a48 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Mon, 30 Oct 2023 18:33:33 +0100 Subject: [PATCH 1/5] Update commit format --- monorepo/DevTools/src/MonorepoReleaseCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monorepo/DevTools/src/MonorepoReleaseCommand.php b/monorepo/DevTools/src/MonorepoReleaseCommand.php index bb5a09f2e0f..135b0b6f75a 100644 --- a/monorepo/DevTools/src/MonorepoReleaseCommand.php +++ b/monorepo/DevTools/src/MonorepoReleaseCommand.php @@ -307,7 +307,7 @@ protected function makeMonorepoCommit(): void $this->output->write('Committing framework version change... '); $this->runUnlessDryRun('git add .', true); - $this->runUnlessDryRun('git commit -m "Version v'.$this->newVersion.'"'); + $this->runUnlessDryRun('git commit -m "HydePHP v'.$this->newVersion.' - '.date('Y-m-d').'"'); $this->exitIfFailed(); From 4231c69dc8a0738ce5d3f8effe500c522c5d85e7 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Mon, 30 Oct 2023 18:37:19 +0100 Subject: [PATCH 2/5] Fix wrong repo name --- monorepo/DevTools/src/MonorepoReleaseCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monorepo/DevTools/src/MonorepoReleaseCommand.php b/monorepo/DevTools/src/MonorepoReleaseCommand.php index 135b0b6f75a..fe0c53080dd 100644 --- a/monorepo/DevTools/src/MonorepoReleaseCommand.php +++ b/monorepo/DevTools/src/MonorepoReleaseCommand.php @@ -326,7 +326,7 @@ protected function prepareHydePR(): void protected function prepareDocsPR(): void { - $this->preparePackagePR('hyde', 'upcoming', 'Merge upcoming documentation', 'This PR merges the upcoming documentation for v'.$this->newVersion.' into the master branch.'); + $this->preparePackagePR('hydephp.com', 'upcoming', 'Merge upcoming documentation', 'This PR merges the upcoming documentation for v'.$this->newVersion.' into the master branch.'); } protected function getTitle(): string From abacef71728e0ea564e7c8d4f71ffd339c519285 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Mon, 30 Oct 2023 18:37:41 +0100 Subject: [PATCH 3/5] Formatting --- monorepo/DevTools/src/MonorepoReleaseCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monorepo/DevTools/src/MonorepoReleaseCommand.php b/monorepo/DevTools/src/MonorepoReleaseCommand.php index fe0c53080dd..0ebf78f2638 100644 --- a/monorepo/DevTools/src/MonorepoReleaseCommand.php +++ b/monorepo/DevTools/src/MonorepoReleaseCommand.php @@ -326,7 +326,7 @@ protected function prepareHydePR(): void protected function prepareDocsPR(): void { - $this->preparePackagePR('hydephp.com', 'upcoming', 'Merge upcoming documentation', 'This PR merges the upcoming documentation for v'.$this->newVersion.' into the master branch.'); + $this->preparePackagePR('hydephp.com', 'upcoming', 'Merge upcoming documentation', 'This PR merges the upcoming documentation for `v'.$this->newVersion.'` into the master branch.'); } protected function getTitle(): string From 00c666b14410c25e335d8fdfeb810490ea8a748b Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Mon, 30 Oct 2023 18:59:35 +0100 Subject: [PATCH 4/5] Use empty release body for patches --- monorepo/DevTools/src/MonorepoReleaseCommand.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/monorepo/DevTools/src/MonorepoReleaseCommand.php b/monorepo/DevTools/src/MonorepoReleaseCommand.php index 0ebf78f2638..e991650038b 100644 --- a/monorepo/DevTools/src/MonorepoReleaseCommand.php +++ b/monorepo/DevTools/src/MonorepoReleaseCommand.php @@ -354,11 +354,13 @@ protected function preparePackagePR(string $package, string $branch = 'develop', protected function prepareMonorepoPR(): void { - $title = $this->isPatch() - ? "Framework version v$this->newVersion" - : "HydePHP v$this->newVersion - ".date('Y-m-d'); - - $body = $this->releaseBody; + if ($this->isPatch()) { + $title = "Framework version v$this->newVersion"; + $body = ''; + } else { + $title = "HydePHP v$this->newVersion - " . date('Y-m-d'); + $body = $this->releaseBody; + } // Inject "version" before version in PR body $body = preg_replace('/## \[(.*)]/', '## Version [v$1]', $body, 1); From 75b7d25d65caadd33122392cbaf476e764f39524 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 30 Oct 2023 17:59:54 +0000 Subject: [PATCH 5/5] Apply fixes from StyleCI --- monorepo/DevTools/src/MonorepoReleaseCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monorepo/DevTools/src/MonorepoReleaseCommand.php b/monorepo/DevTools/src/MonorepoReleaseCommand.php index e991650038b..26b62de21bf 100644 --- a/monorepo/DevTools/src/MonorepoReleaseCommand.php +++ b/monorepo/DevTools/src/MonorepoReleaseCommand.php @@ -358,7 +358,7 @@ protected function prepareMonorepoPR(): void $title = "Framework version v$this->newVersion"; $body = ''; } else { - $title = "HydePHP v$this->newVersion - " . date('Y-m-d'); + $title = "HydePHP v$this->newVersion - ".date('Y-m-d'); $body = $this->releaseBody; }