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

@ -36,10 +36,13 @@ public function connect(bool $sftp = false): void
public function exec(string $command, string $log = '', ?int $siteId = null, ?bool $stream = false): string
{
if ($log) {
$this->setLog($log, $siteId);
} else {
$this->log = null;
if (! $this->log && $log) {
$this->log = $this->server->logs()->create([
'site_id' => $siteId,
'name' => $this->server->id.'-'.strtotime('now').'-'.$log.'.log',
'type' => $log,
'disk' => config('core.logs_disk'),
]);
}
$this->commands[] = $command;