mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-05 00:48:57 +02:00
Adds general.yml parameter "ssh_needs_tty" which appends "-t" to the ssh
command
Adds deployment parameter "rsync: { copy: yes }" which copies the prior
release then rsync's (to increase speed)
This commit is contained in:
@@ -179,17 +179,20 @@ abstract class AbstractTask
|
||||
$releasesDirectory = '';
|
||||
|
||||
} else {
|
||||
$releasesDirectory = '/'
|
||||
. $this->getConfig()->release('directory', 'releases')
|
||||
. '/'
|
||||
$releasesDirectory = '/'
|
||||
. $this->getConfig()->release('directory', 'releases')
|
||||
. '/'
|
||||
. $this->getConfig()->getReleaseId();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$releasesDirectory = '';
|
||||
}
|
||||
|
||||
// if general.yml includes "ssy_needs_tty: true", then add "-t" to the ssh command
|
||||
$needs_tty = ($this->getConfig()->general('ssh_needs_tty',false) ? "-t" : "");
|
||||
|
||||
$localCommand = 'ssh -p ' . $this->getConfig()->getHostPort() . ' '
|
||||
$localCommand = 'ssh ' . $needs_tty . ' -p ' . $this->getConfig()->getHostPort() . ' '
|
||||
. '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '
|
||||
. $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ' '
|
||||
. '"cd ' . rtrim($this->getConfig()->deployment('to'), '/') . $releasesDirectory . ' && '
|
||||
@@ -213,4 +216,4 @@ abstract class AbstractTask
|
||||
return $this->runCommandLocal($command, $output);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user