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:
@ -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;
|
||||
|
Reference in New Issue
Block a user