mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
Accurate deployment statuses (#168)
This commit is contained in:
@ -127,16 +127,18 @@ public function tail(string $path, int $lines): string
|
||||
);
|
||||
}
|
||||
|
||||
public function runScript(string $path, string $script, ?int $siteId = null): ServerLog
|
||||
public function runScript(string $path, string $script, ?ServerLog $serverLog): ServerLog
|
||||
{
|
||||
$ssh = $this->server->ssh();
|
||||
if ($serverLog) {
|
||||
$ssh->setLog($serverLog);
|
||||
}
|
||||
$ssh->exec(
|
||||
$this->getScript('run-script.sh', [
|
||||
'path' => $path,
|
||||
'script' => $script,
|
||||
]),
|
||||
'run-script',
|
||||
$siteId
|
||||
'run-script'
|
||||
);
|
||||
|
||||
return $ssh->log;
|
||||
|
Reference in New Issue
Block a user