diff options
author | Pascal Terjan <pterjan@mageia.org> | 2013-01-22 11:08:04 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2013-01-22 11:08:04 +0000 |
commit | 070566880dbb45f4ec65c81abf03b8e4f3e178b8 (patch) | |
tree | 95841ae2ab8878d6b6615cb0effd178e964f91cd /autobuild/history.php | |
parent | 07e729219263055c87998bcea29f5fe6f27299d7 (diff) | |
download | pkgsubmit-070566880dbb45f4ec65c81abf03b8e4f3e178b8.tar pkgsubmit-070566880dbb45f4ec65c81abf03b8e4f3e178b8.tar.gz pkgsubmit-070566880dbb45f4ec65c81abf03b8e4f3e178b8.tar.bz2 pkgsubmit-070566880dbb45f4ec65c81abf03b8e4f3e178b8.tar.xz pkgsubmit-070566880dbb45f4ec65c81abf03b8e4f3e178b8.zip |
Add build history of packages
Diffstat (limited to 'autobuild/history.php')
-rw-r--r-- | autobuild/history.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/autobuild/history.php b/autobuild/history.php new file mode 100644 index 0000000..a9ac27b --- /dev/null +++ b/autobuild/history.php @@ -0,0 +1,25 @@ +<?php +$package=preg_replace('/[^[:alnum:]_.+-]/', '', $_GET['package']); +if (!$package) { + die("Invalid package"); +} +$db = new SQLite3('autobuild.db'); +$package_id = $db->querySingle("SELECT Id FROM Packages WHERE Name = '$package'"); +if (!$package_id) { + die("Invalid package"); +} +echo "<h1>History of package \"$package\"</h1>\n"; +$result = $db->query("SELECT date(datetime(Start, 'unixepoch')) as run, ResultValues.Name FROM Runs, Results, ResultValues WHERE Runs.Id = Results.Run AND Results.Result = ResultValues.Id AND Results.Package = '$package_id' ORDER BY Start DESC"); +while ($entry = $result->fetchArray(SQLITE3_ASSOC)) { + $run = $entry['run']; + $build_result = $entry['Name']; + echo "<a href='results.php?run=$run' >$run</a> "; + $base_dir = "cauldron/x86_64/core/$run"; + if ($link = glob("$base_dir/$package-*.src.rpm/")) { + echo "<a href='$link[0]'>$build_result</a><br/>\n"; + } else { + echo "$build_result<br/>\n"; + } +} + +?> |