1
0
mirror of https://github.com/hauke68/Magallanes.git synced 2025-08-26 13:20:17 +02:00
This commit is contained in:
Andrés Montañez 2014-11-01 19:09:25 -02:00
parent e4aafb3d3f
commit 8771cf2ab1
2 changed files with 20 additions and 2 deletions

View File

@ -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':

View File

@ -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());