Add a check if translations are ready

[MAILPOET-3807]
This commit is contained in:
Pavel Dohnal
2021-11-09 09:56:02 +01:00
committed by Veljko V
parent eda7a74f25
commit 652fa9ce80
2 changed files with 59 additions and 4 deletions

View File

@ -769,12 +769,29 @@ class RoboFile extends \Robo\Tasks {
$this->say('Translations ' . $result['data']);
}
/**
* This is part of release publish script. It checks if translations are ready at Wordpress.com translations system
* @param string $version
*/
public function translationsCheckLanguagePacks($version) {
$translations = new \MailPoetTasks\Release\TranslationsController();
$result = $translations->checkIfTranslationsAreReady($version);
if (!$result['success']) {
$this->yell('Translations are not ready yet on WordPress.com. ' . $result['data'], 40, 'red');
exit(1);
}
$this->say('Translations check passed');
}
public function releasePublish($version = null) {
$version = $this->releaseVersionGetPrepared($version);
return $this->collectionBuilder()
->addCode(function () use ($version) {
return $this->releaseCheckPullRequest($version);
})
->addCode(function () use ($version) {
return $this->translationsCheckLanguagePacks($version);
})
->addCode(function () {
return $this->releaseDownloadZip();
})