1
0
mirror of https://github.com/hauke68/Magallanes.git synced 2025-08-25 21:00:18 +02:00

Merge branch 'master' into develop

This commit is contained in:
Andrés Montañez 2015-01-09 21:03:06 -02:00
commit f4c3817b37
2 changed files with 8 additions and 5 deletions

View File

@ -75,9 +75,10 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride
}
// Remove symlink if exists; create new symlink and change owners
$command = 'rm -f ' . $symlink
. ' ; '
. 'ln -sf ' . $currentCopy . ' ' . $symlink;
$tmplink = $currentCopy . '.tmp';
$command = 'ln -sfn ' . $currentCopy . ' ' . $tmplink
. ' && '
. 'mv -T ' . $tmplink . ' ' . $symlink;
if ($resultFetch && $userGroup != '') {
$command .= ' && '

View File

@ -133,9 +133,11 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
$userGroup = '';
$resultFetch = $this->runCommandRemote('ls -ld ' . $rollbackTo . ' | awk \'{print \$3":"\$4}\'', $userGroup);
$command = 'rm -f ' . $symlink
$tmplink = $rollbackTo . '.tmp';
$command = 'ln -sfn ' . $currentCopy . ' ' . $tmplink
. ' && '
. 'ln -sf ' . $rollbackTo . ' ' . $symlink;
. 'mv -T ' . $tmplink . ' ' . $symlink;
if ($resultFetch) {
$command .= ' && chown -h ' . $userGroup . ' ' . $symlink;