mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +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 = '';
|
$detectionLogs = '';
|
||||||
$separator = \strpos($logs, '{APPWRITE_DETECTION_SEPARATOR_START}');
|
$separator = \strpos($logs, '{APPWRITE_DETECTION_SEPARATOR_START}');
|
||||||
if ($separator !== false) {
|
if ($separator !== false) {
|
||||||
$detectionLogs = \substr($logs, $separator + strlen('{APPWRITE_DETECTION_SEPARATOR}'));
|
[$logsBefore, $detectionLogsStart] = \explode('{APPWRITE_DETECTION_SEPARATOR_START}', $logs, 2);
|
||||||
$separatorEnd = \strpos($detectionLogs, '{APPWRITE_DETECTION_SEPARATOR_END}');
|
[$detectionLogs, $logsAfter] = \explode('{APPWRITE_DETECTION_SEPARATOR_END}', $detectionLogsStart, 2);
|
||||||
$logs .= \substr($detectionLogs, $separatorEnd + strlen('{APPWRITE_DETECTION_SEPARATOR_END}'));
|
$logs = $logsBefore . $logsAfter;
|
||||||
$detectionLogs = \substr($detectionLogs, 0, $separatorEnd);
|
|
||||||
$logs = \substr($logs, 0, $separator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$deployment->setAttribute('buildLogs', $logs);
|
$deployment->setAttribute('buildLogs', $logs);
|
||||||
|
|
@ -877,7 +875,6 @@ class Builds extends Action
|
||||||
->setPayload($deployment->getArrayCopy())
|
->setPayload($deployment->getArrayCopy())
|
||||||
->trigger();
|
->trigger();
|
||||||
|
|
||||||
|
|
||||||
$this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment);
|
$this->afterBuildSuccess($queueForRealtime, $dbForProject, $deployment);
|
||||||
|
|
||||||
if ($resource->getCollection() === 'sites') {
|
if ($resource->getCollection() === 'sites') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue