mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-29 10:40:22 +02:00
[Nostromo] Rollback command, Mess Detector recommendation.
This commit is contained in:
parent
5bff78e1cd
commit
3749978ccc
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue