Throw an exception if plugin version could not be determined [MAILPOET-1156]

This commit is contained in:
stoletniy
2017-10-11 13:07:53 +03:00
parent 7393b1f2cf
commit daf747d3be

View File

@@ -295,6 +295,10 @@ class RoboFile extends \Robo\Tasks {
$plugin_version = $this->getPluginVersion('mailpoet.php');
$plugin_dist_name = 'mailpoet';
$plugin_dist_file = $plugin_dist_name . '.zip';
if(!$plugin_version) {
throw new \Exception('Could not parse plugin version, check the plugin header');
}
$this->say('Publishing version: ' . $plugin_version);
// Sanity checks