Add release preparation command [MAILPOET-1847]
This commit is contained in:
18
RoboFile.php
18
RoboFile.php
@ -636,13 +636,29 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
$this->validateVersion($version);
|
$this->validateVersion($version);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$output = $this->getReleaseVersionController()
|
list($version, $output) = $this->getReleaseVersionController()
|
||||||
->assignVersionToCompletedTickets($version);
|
->assignVersionToCompletedTickets($version);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->yell($e->getMessage(), 40, 'red');
|
$this->yell($e->getMessage(), 40, 'red');
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
$this->say($output);
|
$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) {
|
protected function validateVersion($version) {
|
||||||
|
@ -35,7 +35,7 @@ class ReleaseVersionController {
|
|||||||
}, $issues);
|
}, $issues);
|
||||||
$output[] = "Done, issues processed: " . count($result);
|
$output[] = "Done, issues processed: " . count($result);
|
||||||
|
|
||||||
return join("\n", $output);
|
return [$version, join("\n", $output)];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDoneIssuesWithoutVersion() {
|
private function getDoneIssuesWithoutVersion() {
|
||||||
|
Reference in New Issue
Block a user