Added --version support in Release/sort-changelog command

This commit is contained in:
SilverFire - Dmitry Naumenko
2018-03-13 15:45:37 +02:00
parent 7a38c795b4
commit a3c5ae620a

View File

@ -68,6 +68,8 @@ class ReleaseController extends Controller
if ($actionID === 'release') { if ($actionID === 'release') {
$options[] = 'dryRun'; $options[] = 'dryRun';
$options[] = 'version'; $options[] = 'version';
} elseif ($actionID === 'sort-changelog') {
$options[] = 'version';
} elseif ($actionID === 'info') { } elseif ($actionID === 'info') {
$options[] = 'update'; $options[] = 'update';
} }
@ -321,7 +323,7 @@ class ReleaseController extends Controller
} }
$this->validateWhat($what, ['framework', 'ext'], false); $this->validateWhat($what, ['framework', 'ext'], false);
$version = array_values($this->getNextVersions($this->getCurrentVersions($what), self::PATCH))[0]; $version = $this->version ?: array_values($this->getNextVersions($this->getCurrentVersions($what), self::PATCH))[0];
$this->stdout('sorting CHANGELOG of '); $this->stdout('sorting CHANGELOG of ');
$this->stdout(reset($what), Console::BOLD); $this->stdout(reset($what), Console::BOLD);
$this->stdout(' for version '); $this->stdout(' for version ');