mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix logs parsing
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user