Skip to content

Commit 16a1cb5

Browse files
authored
Merge pull request #1422 from hydephp/add-monorepo-tools
Update internal monorepo release command
2 parents 0ed0f15 + 75b7d25 commit 16a1cb5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

monorepo/DevTools/src/MonorepoReleaseCommand.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ protected function makeMonorepoCommit(): void
307307
$this->output->write('Committing framework version change... ');
308308

309309
$this->runUnlessDryRun('git add .', true);
310-
$this->runUnlessDryRun('git commit -m "Version v'.$this->newVersion.'"');
310+
$this->runUnlessDryRun('git commit -m "HydePHP v'.$this->newVersion.' - '.date('Y-m-d').'"');
311311

312312
$this->exitIfFailed();
313313

@@ -326,7 +326,7 @@ protected function prepareHydePR(): void
326326

327327
protected function prepareDocsPR(): void
328328
{
329-
$this->preparePackagePR('hyde', 'upcoming', 'Merge upcoming documentation', 'This PR merges the upcoming documentation for v'.$this->newVersion.' into the master branch.');
329+
$this->preparePackagePR('hydephp.com', 'upcoming', 'Merge upcoming documentation', 'This PR merges the upcoming documentation for `v'.$this->newVersion.'` into the master branch.');
330330
}
331331

332332
protected function getTitle(): string
@@ -354,11 +354,13 @@ protected function preparePackagePR(string $package, string $branch = 'develop',
354354

355355
protected function prepareMonorepoPR(): void
356356
{
357-
$title = $this->isPatch()
358-
? "Framework version v$this->newVersion"
359-
: "HydePHP v$this->newVersion - ".date('Y-m-d');
360-
361-
$body = $this->releaseBody;
357+
if ($this->isPatch()) {
358+
$title = "Framework version v$this->newVersion";
359+
$body = '';
360+
} else {
361+
$title = "HydePHP v$this->newVersion - ".date('Y-m-d');
362+
$body = $this->releaseBody;
363+
}
362364

363365
// Inject "version" before version in PR body
364366
$body = preg_replace('/## \[(.*)]/', '## Version [v$1]', $body, 1);

0 commit comments

Comments
 (0)