summaryrefslogtreecommitdiffstats
path: root/autobuild
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-11-22 20:27:42 +0000
committerPascal Terjan <pterjan@mageia.org>2020-11-22 20:27:42 +0000
commit792ab335f659024afc62057b0796d09faf7e173b (patch)
tree539e2d4081b5c0dd1275529cec9a9c15e469bcd4 /autobuild
parent4d8eaee829e81cf25b5704a53bd4f5b482faa3a6 (diff)
downloadpkgsubmit-792ab335f659024afc62057b0796d09faf7e173b.tar
pkgsubmit-792ab335f659024afc62057b0796d09faf7e173b.tar.gz
pkgsubmit-792ab335f659024afc62057b0796d09faf7e173b.tar.bz2
pkgsubmit-792ab335f659024afc62057b0796d09faf7e173b.tar.xz
pkgsubmit-792ab335f659024afc62057b0796d09faf7e173b.zip
Handle automatically swtiching autobuild between architectures
Diffstat (limited to 'autobuild')
-rw-r--r--autobuild/results.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/autobuild/results.php b/autobuild/results.php
index ad471cf..29f988b 100644
--- a/autobuild/results.php
+++ b/autobuild/results.php
@@ -31,8 +31,15 @@ while (false !== ($entry = readdir($handle))) {
closedir($handle);
sort($runs);
-# TODO: glob on arch and take most recent
-$latest = readlink("cauldron/x86_64/core/latest");
+$latestlinks = array_values(glob("cauldron/*/core/latest"));
+$latest = 0;
+foreach ($latestlinks as $link) {
+ $date = readlink($link);
+ if ($date > $latest) {
+ $latest = $date;
+ }
+}
+
$run = $_GET['run'];
if (!$run) {
$run = $latest;