Unify 'version-name' option vs. 'version' argument

[MAILPOET-1977]
This commit is contained in:
Jan Jakeš
2019-04-23 11:24:22 +02:00
committed by M. Shull
parent 6625009605
commit f9b7ece35e

View File

@ -521,7 +521,7 @@ class RoboFile extends \Robo\Tasks {
return $this->releaseVersionWrite($version); return $this->releaseVersionWrite($version);
}) })
->addCode(function () use ($version) { ->addCode(function () use ($version) {
return $this->releaseChangelogWrite(['version-name' => $version]); return $this->releaseChangelogWrite($version);
}) })
->run(); ->run();
} }
@ -600,15 +600,15 @@ class RoboFile extends \Robo\Tasks {
->run(); ->run();
} }
function releaseChangelogGet($opts = ['version-name' => null]) { function releaseChangelogGet($version = null) {
$outputs = $this->getChangelogController()->get($opts['version-name']); $outputs = $this->getChangelogController()->get($version);
$this->say("Changelog \n{$outputs[0]} \n{$outputs[1]}\n"); $this->say("Changelog \n{$outputs[0]} \n{$outputs[1]}\n");
$this->say("IMPORTANT NOTES \n" . ($outputs[2] ?: 'none')); $this->say("IMPORTANT NOTES \n" . ($outputs[2] ?: 'none'));
} }
function releaseChangelogWrite($opts = ['version-name' => null]) { function releaseChangelogWrite($version = null) {
$this->say("Updating changelog"); $this->say("Updating changelog");
$outputs = $this->getChangelogController()->update($opts['version-name']); $outputs = $this->getChangelogController()->update($version);
$this->say("Changelog \n{$outputs[0]} \n{$outputs[1]}\n\n"); $this->say("Changelog \n{$outputs[0]} \n{$outputs[1]}\n\n");
$this->say("IMPORTANT NOTES \n" . ($outputs[2] ?: 'none')); $this->say("IMPORTANT NOTES \n" . ($outputs[2] ?: 'none'));
} }