1
0
mirror of https://github.com/hauke68/Magallanes.git synced 2025-09-01 23:40:17 +02:00

Rollback directory should include deployment:to config variable

This commit is contained in:
Jérémy Huet 2015-01-12 18:50:32 +01:00
parent e453d1977d
commit d25d015356

View File

@ -51,6 +51,10 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');
if (substr($symlink, 0, 1) == '/') {
$releasesDirectory = rtrim($this->getConfig()->deployment('to'), '/') . '/' . $releasesDirectory;
}
$output = '';
$result = $this->runCommandRemote('ls -1 ' . $releasesDirectory, $output);
$releases = ($output == '') ? array() : explode(PHP_EOL, $output);