Merge pull request #425 from agalic89/master

Add optional symlink
This commit is contained in:
Andrés Montañez 2022-04-10 18:18:22 -03:00 committed by GitHub
commit ca808e4853
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,8 +41,10 @@ class ReleaseTask extends AbstractTask implements ExecuteOnRollbackInterface
$hostPath = rtrim($this->runtime->getEnvOption('host_path'), '/');
$releaseId = $this->runtime->getReleaseId();
$symlink = $this->runtime->getEnvOption('symlink', 'current');
$cmdLinkRelease = sprintf('cd %s && ln -snf releases/%s current', $hostPath, $releaseId);
$cmdLinkRelease = sprintf('cd %s && ln -snf releases/%s %s', $hostPath, $releaseId, $symlink);
/** @var Process $process */
$process = $this->runtime->runRemoteCommand($cmdLinkRelease, false, 0);