Accurate deployment statuses (#168)

This commit is contained in:
Saeed Vaziry
2024-04-21 16:26:26 +02:00
committed by GitHub
parent e2dd9177f7
commit f0da1c6d8c
11 changed files with 88 additions and 35 deletions

View File

@ -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;