fixed bug with a env-configuration containing deployment description in hosts section

This commit is contained in:
Alex V Kotelnikov 2014-11-13 00:13:19 +04:00
parent 5199a915b6
commit 8e603bd0d2

View file

@ -439,13 +439,22 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
} else {
$result = true;
foreach ($hosts as $host) {
$this->getConfig()->setHost($host);
foreach ($hosts as $hostKey => $host) {
$hostConfig = null;
if (is_array($host)) {
$hostConfig = $host;
$host = $hostKey;
}
// Set Host and Host Specific Config
$this->getConfig()->setHost($host);
$this->getConfig()->setHostConfig($hostConfig);
$this->getConfig()->setReleaseId(-1);
$task = Factory::get('releases/rollback', $this->getConfig());
$task->init();
$result = $task->run() && $result;
}
return $result;
}