|
|
@ -106,6 +106,7 @@ class RollbackCommand extends DeployCommand |
|
|
|
|
|
|
|
|
|
|
|
$availableInHosts = 0; |
|
|
|
$availableInHosts = 0; |
|
|
|
foreach ($hosts as $host) { |
|
|
|
foreach ($hosts as $host) { |
|
|
|
|
|
|
|
$releases = []; |
|
|
|
$this->runtime->setWorkingHost($host); |
|
|
|
$this->runtime->setWorkingHost($host); |
|
|
|
|
|
|
|
|
|
|
|
// Get List of Releases |
|
|
|
// Get List of Releases |
|
|
@ -113,9 +114,7 @@ class RollbackCommand extends DeployCommand |
|
|
|
|
|
|
|
|
|
|
|
/** @var Process $process */ |
|
|
|
/** @var Process $process */ |
|
|
|
$process = $this->runtime->runRemoteCommand($cmdListReleases, false); |
|
|
|
$process = $this->runtime->runRemoteCommand($cmdListReleases, false); |
|
|
|
if (!$process->isSuccessful()) { |
|
|
|
if ($process->isSuccessful()) { |
|
|
|
$releases = []; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$releases = explode(PHP_EOL, trim($process->getOutput())); |
|
|
|
$releases = explode(PHP_EOL, trim($process->getOutput())); |
|
|
|
rsort($releases); |
|
|
|
rsort($releases); |
|
|
|
} |
|
|
|
} |
|
|
|