mirror of
https://github.com/appwrite/appwrite
synced 2026-05-20 23:48:23 +00:00
Fix logs parsing
This commit is contained in:
parent
6996cc28a0
commit
5dcc508870
1 changed files with 3 additions and 6 deletions
|
|
@ -838,11 +838,9 @@ class Builds extends Action
|
|||
$detectionLogs = '';
|
||||
$separator = \strpos($logs, '{APPWRITE_DETECTION_SEPARATOR_START}');
|
||||
if ($separator !== false) {
|
||||
$detectionLogs = \substr($logs, $separator + strlen('{APPWRITE_DETECTION_SEPARATOR}'));
|
||||
$separatorEnd = \strpos($detectionLogs, '{APPWRITE_DETECTION_SEPARATOR_END}');
|
||||
$logs .= \substr($detectionLogs, $separatorEnd + strlen('{APPWRITE_DETECTION_SEPARATOR_END}'));
|
||||
$detectionLogs = \substr($detectionLogs, 0, $separatorEnd);
|
||||
$logs = \substr($logs, 0, $separator);
|
||||
[$logsBefore, $detectionLogsStart] = \explode('{APPWRITE_DETECTION_SEPARATOR_START}', $logs, 2);
|
||||
[$detectionLogs, $logsAfter] = \explode('{APPWRITE_DETECTION_SEPARATOR_END}', $detectionLogsStart, 2);
|
||||
$logs = $logsBefore . $logsAfter;
|
||||
}
|
||||
|
||||
$deployment->setAttribute('buildLogs', $logs);
|
||||
|
|
@ -877,7 +875,6 @@ class Builds extends Action
|
|||
->setPayload($deployment->getArrayCopy())
|
||||
->trigger();
|
||||
|
||||
|
||||
$this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment);
|
||||
|
||||
if ($resource->getCollection() === 'sites') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue