diff --git a/src/Task/BuiltIn/Deploy/ReleaseTask.php b/src/Task/BuiltIn/Deploy/ReleaseTask.php index fdc404a..924e4ff 100644 --- a/src/Task/BuiltIn/Deploy/ReleaseTask.php +++ b/src/Task/BuiltIn/Deploy/ReleaseTask.php @@ -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);