diff --git a/Mage/Command/BuiltIn/ReleasesCommand.php b/Mage/Command/BuiltIn/ReleasesCommand.php index 2837903..e9f0443 100644 --- a/Mage/Command/BuiltIn/ReleasesCommand.php +++ b/Mage/Command/BuiltIn/ReleasesCommand.php @@ -44,8 +44,17 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment } $result = true; - foreach ($hosts as $host) { + foreach ($hosts as $hostKey => $host) { + // Check if Host has specific configuration + $hostConfig = null; + if (is_array($host)) { + $hostConfig = $host; + $host = $hostKey; + } + + // Set Host and Host Specific Config $this->getConfig()->setHost($host); + $this->getConfig()->setHostConfig($hostConfig); switch ($subCommand) { case 'list': diff --git a/Mage/Command/BuiltIn/RollbackCommand.php b/Mage/Command/BuiltIn/RollbackCommand.php index 7a5b85b..1023869 100644 --- a/Mage/Command/BuiltIn/RollbackCommand.php +++ b/Mage/Command/BuiltIn/RollbackCommand.php @@ -51,8 +51,17 @@ class RollbackCommand extends AbstractCommand implements RequiresEnvironment } else { $result = true; - foreach ($hosts as $host) { + foreach ($hosts as $hostKey => $host) { + // Check if Host has specific configuration + $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($releaseId); $task = Factory::get('releases/rollback', $this->getConfig());