Add release preparation command [MAILPOET-1847]

This commit is contained in:
wxa
2019-02-28 13:34:24 +03:00
committed by M. Shull
parent 17d361c108
commit de4a95cf92
2 changed files with 18 additions and 2 deletions

View File

@ -636,13 +636,29 @@ class RoboFile extends \Robo\Tasks {
$this->validateVersion($version);
}
try {
$output = $this->getReleaseVersionController()
list($version, $output) = $this->getReleaseVersionController()
->assignVersionToCompletedTickets($version);
} catch (\Exception $e) {
$this->yell($e->getMessage(), 40, 'red');
exit(1);
}
$this->say($output);
if (!empty($opts['return'])) {
return $version;
}
}
public function prepareRelease($version = null) {
$version = $this->jiraReleaseVersion($version, ['return' => true]);
return $this->collectionBuilder()
->addCode(function () use ($version) {
return $this->writeReleaseVersion($version);
})
->addCode(function () use ($version) {
return $this->changelogUpdate(['version-name' => $version]);
})
->run();
}
protected function validateVersion($version) {

View File

@ -35,7 +35,7 @@ class ReleaseVersionController {
}, $issues);
$output[] = "Done, issues processed: " . count($result);
return join("\n", $output);
return [$version, join("\n", $output)];
}
private function getDoneIssuesWithoutVersion() {