mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-08 22:38:56 +02:00
[Nostromo] Refactor Runtime methods.
This commit is contained in:
@@ -33,14 +33,14 @@ class CopyTask extends AbstractTask
|
||||
|
||||
public function execute()
|
||||
{
|
||||
if (!$this->runtime->getEnvParam('releases', false)) {
|
||||
if (!$this->runtime->getEnvOption('releases', false)) {
|
||||
throw new ErrorException('This task is only available with releases enabled', 40);
|
||||
}
|
||||
|
||||
$user = $this->runtime->getEnvParam('user', $this->runtime->getCurrentUser());
|
||||
$user = $this->runtime->getEnvOption('user', $this->runtime->getCurrentUser());
|
||||
$host = $this->runtime->getWorkingHost();
|
||||
$sshConfig = $sshConfig = $this->runtime->getSSHConfig();
|
||||
$hostPath = rtrim($this->runtime->getEnvParam('host_path'), '/');
|
||||
$hostPath = rtrim($this->runtime->getEnvOption('host_path'), '/');
|
||||
$currentReleaseId = $this->runtime->getReleaseId();
|
||||
|
||||
$targetDir = sprintf('%s/releases/%s', $hostPath, $currentReleaseId);
|
||||
|
||||
Reference in New Issue
Block a user