_config['deploy']['releases']['enabled'])) {
if ($this->_config['deploy']['releases']['enabled'] == 'true') {
if (isset($this->_config['deploy']['releases']['directory'])) {
$releasesDirectory = $this->_config['deploy']['releases']['directory'];
} else {
$releasesDirectory = 'releases';
}
if (isset($this->_config['deploy']['releases']['symlink'])) {
$symlink = $this->_config['deploy']['releases']['symlink'];
} else {
$symlink = 'current';
}
Mage_Console::output('Releases available on ' . $this->_config['deploy']['host'] . '');
$output = '';
$result = $this->_runRemoteCommand('ls -1 ' . $releasesDirectory, $output);
$releases = ($output == '') ? array() : explode(PHP_EOL, $output);
if (count($releases) == 0) {
Mage_Console::output('No releases available ... ', 2);
} else {
rsort($releases);
foreach ($releases as $releaseIndex => $releaseDate) {
Mage_Console::output('Index: ' . $releaseIndex . ' - ' . $releaseDate . '', 2);
}
}
return $result;
} else {
return false;
}
} else {
return false;
}
}
}