Removed MultiWear, style update, xhtml compliance
This commit is contained in:
@@ -60,7 +60,7 @@ a, a:link, a:hover, a:visited, a:active {
|
|||||||
td, th {
|
td, th {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 3px 20px 3px 3px;
|
padding: 3px 3px 3px 3px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -69,6 +69,7 @@ td, th {
|
|||||||
th {
|
th {
|
||||||
border-bottom: solid 1px #404040;
|
border-bottom: solid 1px #404040;
|
||||||
background: url(images/container-bg.gif) top repeat-x;
|
background: url(images/container-bg.gif) top repeat-x;
|
||||||
|
padding: 5px 3px 10px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.build-list {
|
.build-list {
|
||||||
|
|||||||
38
index.php
38
index.php
@@ -55,7 +55,6 @@ function print_changes($current, $next, $chan)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($res = $DB->query(kl_str_sql("select * from revs where chan=!s and hash in ('" . implode("','", $revs) . "')", $chan))) {
|
if ($res = $DB->query(kl_str_sql("select * from revs where chan=!s and hash in ('" . implode("','", $revs) . "')", $chan))) {
|
||||||
print '<table style="width: 100%;">';
|
|
||||||
|
|
||||||
$changesets = array();
|
$changesets = array();
|
||||||
|
|
||||||
@@ -63,8 +62,12 @@ function print_changes($current, $next, $chan)
|
|||||||
$changesets[] = $row;
|
$changesets[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
usort($changesets, "sort_by_date");
|
if (count($changesets) == 0) return;
|
||||||
|
|
||||||
|
print '<table style="width: 99%;">';
|
||||||
|
|
||||||
|
usort($changesets, "sort_by_date");
|
||||||
|
|
||||||
foreach ($changesets as $change) {
|
foreach ($changesets as $change) {
|
||||||
print_changeset($change);
|
print_changeset($change);
|
||||||
}
|
}
|
||||||
@@ -77,8 +80,19 @@ Function print_build($current, $next, $buildNr, $chan)
|
|||||||
{
|
{
|
||||||
print "
|
print "
|
||||||
<tr style=\"background-color: #303030;\">
|
<tr style=\"background-color: #303030;\">
|
||||||
<th><a href=\"" . URL_ROOT ."?build_id={$current->nr}\">Build " . htmlspecialchars($current->nr). "</a></th>
|
<th><a href=\"" . URL_ROOT ."?build_id={$current->nr}\">Build " . htmlspecialchars($current->nr). "</a><br/>";
|
||||||
<th>" . htmlspecialchars($current->modified). " (" . Layout::since(strtotime($current->modified)) . " ago)</th>
|
|
||||||
|
|
||||||
|
if ($next) {
|
||||||
|
if (($current->linux_file && $current->osx_file)) {
|
||||||
|
print "<br/>";
|
||||||
|
}
|
||||||
|
print '
|
||||||
|
<a href="javascript:void(0)" id="toggle_link_'. $current->nr . '" onclick="javascript:toggleChanges('. $current->nr . ')">' .
|
||||||
|
($buildNr ? 'Hide changes <<' : 'Show changes >>') . '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</th><th>" . htmlspecialchars($current->modified). " (" . Layout::since(strtotime($current->modified)) . " ago)</th>
|
||||||
<th>" . htmlspecialchars($current->chan). "</th>
|
<th>" . htmlspecialchars($current->chan). "</th>
|
||||||
<th><a href='" . URL_ROOT . "/" . $current->file . "'><img src=\"" . IMG_ROOT . "/dl.gif\" alt=\"Download Windows Build\"/> Windows</a>
|
<th><a href='" . URL_ROOT . "/" . $current->file . "'><img src=\"" . IMG_ROOT . "/dl.gif\" alt=\"Download Windows Build\"/> Windows</a>
|
||||||
<a href='" . URL_ROOT . "/" . $current->file . ".log'>Build Log</a>";
|
<a href='" . URL_ROOT . "/" . $current->file . ".log'>Build Log</a>";
|
||||||
@@ -92,27 +106,25 @@ Function print_build($current, $next, $buildNr, $chan)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "</th></tr>";
|
print "</th></tr>";
|
||||||
|
|
||||||
if ($next) {
|
if ($next) {
|
||||||
print '<tr><td colspan="4">
|
print '<tr' . ($buildNr ? '' : ' style="display: none;"') . ' id="changes_' . $current->nr . '"><td colspan="4">';
|
||||||
<a href="javascript:void(0)" id="toggle_link_'. $current->nr . '" onclick="javascript:toggleChanges('. $current->nr . ')">' .
|
|
||||||
($buildNr ? 'Hide changes <<' : 'Show changes >>') .
|
|
||||||
'</a><div ' . ($buildNr ? '' : 'style="display: none;"') . ' id="changes_' . $current->nr . '">';
|
|
||||||
print_changes($current, $next, $chan);
|
print_changes($current, $next, $chan);
|
||||||
print "</div></td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function chan_selector($current_chan)
|
function chan_selector($current_chan)
|
||||||
{
|
{
|
||||||
// return;
|
// return;
|
||||||
global $CHANS;
|
global $CHANS;
|
||||||
print '<form method="GET">';
|
print '<form method="get" action="index.php">';
|
||||||
print 'Select channel <select name="chan" onchange="this.form.submit()">';
|
print 'Select channel <select name="chan" onchange="this.form.submit()">';
|
||||||
foreach($CHANS as $chan => $ref) {
|
foreach($CHANS as $chan => $ref) {
|
||||||
print "<option value=\"$chan\"" . ($current_chan == $chan ? " selected" : "") . ">$chan</option>";
|
print "<option value=\"$chan\"" . ($current_chan == $chan ? " selected=\"selected\"" : "") . ">$chan</option>";
|
||||||
}
|
}
|
||||||
print '</select><noscript><input type="submit" value="Change"></noscript></form>';
|
print '</select><noscript><input type="submit" value="Change"/></noscript></form><br />';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ class Layout
|
|||||||
var link = document.getElementById("toggle_link_" + id);
|
var link = document.getElementById("toggle_link_" + id);
|
||||||
|
|
||||||
if (change) {
|
if (change) {
|
||||||
if (change.style.display == "block") {
|
if (change.style.display == "") {
|
||||||
change.style.display = "none";
|
change.style.display = "none";
|
||||||
link.innerHTML = "Show changes >>";
|
link.innerHTML = "Show changes >>";
|
||||||
} else {
|
} else {
|
||||||
change.style.display = "block";
|
change.style.display = "";
|
||||||
link.innerHTML = "Hide changes <<";
|
link.innerHTML = "Hide changes <<";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
62
lib/cleanup.php
Executable file
62
lib/cleanup.php
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
define("SITE_ROOT", realpath(dirname(__file__) . "/.."));
|
||||||
|
require_once SITE_ROOT . "/lib/init.php";
|
||||||
|
|
||||||
|
|
||||||
|
function get_old_builds($chan, $nrToKeep)
|
||||||
|
{
|
||||||
|
global $DB;
|
||||||
|
|
||||||
|
$builds = array();
|
||||||
|
|
||||||
|
if ($res = $DB->query(kl_str_sql("select * from builds where chan=!s and nr not in (select nr from builds where chan=!s order by nr desc limit !i)", $chan, $chan, $nrToKeep))) {
|
||||||
|
while ($row = $DB->fetchRow($res)) {
|
||||||
|
|
||||||
|
$build = new stdClass;
|
||||||
|
$DB->loadFromDbRow($build, $res, $row);
|
||||||
|
$linux_file = "SingularityAlpha-i686-{$build->version}.tar.bz2";
|
||||||
|
$build->linux_file = file_exists($linux_file) ? $linux_file : false;
|
||||||
|
$osx_file = "SingularityAlpha_" . str_replace(".", "_", $build->version) . ".dmg";
|
||||||
|
$build->osx_file = file_exists($osx_file) ? $osx_file : false;
|
||||||
|
$builds[] = $build;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $builds;
|
||||||
|
}
|
||||||
|
|
||||||
|
chdir(SITE_ROOT);
|
||||||
|
$builds = get_old_builds("SingularityAlpha", 21);
|
||||||
|
$nrBuilds = count($builds);
|
||||||
|
|
||||||
|
for ($i=0; $i<$nrBuilds; $i++) {
|
||||||
|
|
||||||
|
$b = $builds[$i];
|
||||||
|
$f = array();
|
||||||
|
$f[] = $b->file;
|
||||||
|
if ($b->linux_file) $f[] = $b->linux_file;
|
||||||
|
if ($b->osx_file) $f[] = $b->osx_file;
|
||||||
|
|
||||||
|
print "Cleaning build nr.: {$b->nr}\n";
|
||||||
|
|
||||||
|
for ($j=0; $j<count($f); $j++) {
|
||||||
|
print " Deleting {$f[$j]}\n";
|
||||||
|
@unlink(SITE_ROOT . "/" . $f[$j]);
|
||||||
|
@unlink(SITE_ROOT . "/" . $f[$j] . ".log");
|
||||||
|
}
|
||||||
|
|
||||||
|
$DB->query(kl_str_sql("delete from builds where nr=!i and chan=!s", $b->nr, $b->chan));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Local variables:
|
||||||
|
* tab-width: 4
|
||||||
|
* c-basic-offset: 4
|
||||||
|
* End:
|
||||||
|
* vim600: noet sw=4 ts=4 fdm=marker
|
||||||
|
* vim<600: noet sw=4 ts=4
|
||||||
|
*/
|
||||||
@@ -80,9 +80,10 @@ function update_revs()
|
|||||||
|
|
||||||
foreach ($CHANS as $chan => $branch) {
|
foreach ($CHANS as $chan => $branch) {
|
||||||
exec("git fetch --all 2>&1");
|
exec("git fetch --all 2>&1");
|
||||||
if ($branch != "HEAD") {
|
if ($branch == "HEAD") {
|
||||||
exec("git reset --soft $branch 2>&1");
|
$branch = "FETCH_HEAD";
|
||||||
}
|
}
|
||||||
|
exec("git reset --soft $branch 2>&1");
|
||||||
|
|
||||||
$DB->query("begin transaction");
|
$DB->query("begin transaction");
|
||||||
|
|
||||||
@@ -116,7 +117,7 @@ function update_revs()
|
|||||||
$revs = $newRevs;
|
$revs = $newRevs;
|
||||||
$changesAt[$build] = $changes;
|
$changesAt[$build] = $changes;
|
||||||
print $nrChanges . " changes in build $build\n";
|
print $nrChanges . " changes in build $build\n";
|
||||||
if ($build < 2169) break; // this is when we started building
|
if ($build < 2883) break; // this is when we started building
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
save_build_changes($changesAt, $chan);
|
save_build_changes($changesAt, $chan);
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ if (!defined('IMG_ROOT')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$CHANS = array("SingularityAlpha" => "HEAD", "SingularityMultiWearable" => "refs/remotes/shyotl/V2MultiWear");
|
// $CHANS = array("SingularityAlpha" => "HEAD", "SingularityMultiWearable" => "refs/remotes/shyotl/V2MultiWear");
|
||||||
|
$CHANS = array("SingularityAlpha" => "HEAD");
|
||||||
|
|
||||||
$DB = new DBH();
|
$DB = new DBH();
|
||||||
|
|
||||||
$DB_NAME = SITE_ROOT . '/lib/singularity_revisions.db';
|
$DB_NAME = SITE_ROOT . '/lib/singularity_revisions.db';
|
||||||
|
|||||||
Reference in New Issue
Block a user