Add 'release:download-zip' command
[MAILPOET-1883]
This commit is contained in:
27
RoboFile.php
27
RoboFile.php
@ -638,6 +638,14 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
->run();
|
->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function releaseDownloadZip() {
|
||||||
|
$this->loadEnv();
|
||||||
|
$circleci_controller = $this->createCircleCiController();
|
||||||
|
$path = $circleci_controller->downloadLatestBuild(__DIR__ . '/mailpoet.zip');
|
||||||
|
$this->say('Release ZIP downloaded to: ' . $path);
|
||||||
|
$this->say(sprintf('Release ZIP file size: %.2F MB', filesize($path)/pow(1024, 2)));
|
||||||
|
}
|
||||||
|
|
||||||
public function releasePublishSlack($version = null) {
|
public function releasePublishSlack($version = null) {
|
||||||
$this->loadEnv();
|
$this->loadEnv();
|
||||||
$jira_controller = $this->createJiraController();
|
$jira_controller = $this->createJiraController();
|
||||||
@ -666,4 +674,23 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
\MailPoetTasks\Release\JiraController::PROJECT_MAILPOET
|
\MailPoetTasks\Release\JiraController::PROJECT_MAILPOET
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function createCircleCiController() {
|
||||||
|
$this->loadEnv();
|
||||||
|
return new \MailPoetTasks\Release\CircleCiController(
|
||||||
|
getenv('WP_CIRCLECI_USERNAME'),
|
||||||
|
getenv('WP_CIRCLECI_TOKEN'),
|
||||||
|
\MailPoetTasks\Release\CircleCiController::PROJECT_MAILPOET,
|
||||||
|
$this->createGitHubController()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function createGitHubController() {
|
||||||
|
$this->loadEnv();
|
||||||
|
return new \MailPoetTasks\Release\GitHubController(
|
||||||
|
getenv('WP_GITHUB_USERNAME'),
|
||||||
|
getenv('WP_GITHUB_TOKEN'),
|
||||||
|
\MailPoetTasks\Release\GitHubController::PROJECT_MAILPOET
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user