first commit

This commit is contained in:
nix
2026-05-16 11:10:19 +02:00
commit 509c9b3737
172 changed files with 14496 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
header('Content-Type: application/json');
// --- Get all build logs ---
$logs = glob('/var/www/nix.roulaise.net/status/qt-temp/qtw*/temp/build.log');
$logs = array_unique($logs);
$output = "";
$step = "Unknown";
// --- Loop through each log ---
foreach ($logs as $file) {
// Get last line to reduce output
$line = trim(@shell_exec('tail -n 1 ' . escapeshellarg($file)));
$output .= "==> $file <==\n$line\n\n";
// Extract current step [123/456]
if (preg_match('/\[\d+\/\d+\]/', $line, $m)) {
$step = $m[0];
}
}
echo json_encode([
'output' => $output,
'step' => $step
]);