Skip to content

Commit 5eee71c

Browse files
committed
Fix #279: Add link to upgrade notes to news text
1 parent 7ae4f9c commit 5eee71c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/App/Command/Release/MakeCommand.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,20 @@ private function displayReleaseSummary(Package $package, ComposerConfig $compose
306306

307307
$changes = implode("\n", $changes);
308308

309+
$upgradeNotesLink = '';
310+
$upgradePath = $package->getPath() . '/UPGRADE.md';
311+
if (file_exists($upgradePath)) {
312+
$upgradeNotesLink = "\n\nSee [UPGRADE.md](https://github.com/yiisoft/$packageName/blob/$versionToRelease/UPGRADE.md) for upgrade notes.";
313+
}
314+
309315
$text = <<<TEXT
310316
[$description](https://github.com/yiisoft/$packageName) version $versionToRelease was released.
311317
In this version:
312318
313319
$changes
320+
$upgradeNotesLink
314321
TEXT;
315322

316-
$io->info($text . "\n");
323+
$io->info(trim($text)). "\n");
317324
}
318325
}

0 commit comments

Comments
 (0)