my (@products);
my (@steps);
-my ($new_page) = 0;
my ($result) = "failure";
my (%dist_files);
my ($dist_dir);
my $ln = $.;
chomp;
- if (/^\f$/) {
- $new_page = 1;
- @dirstack = ();
- print LOG_HTML "</pre><hr><pre>\n";
- next;
- }
-
if (/Entering directory `(.*)'$/) {
push (@dirstack, $1);
} elsif (/Leaving directory `(.*)'$/) {
}
my $log_class;
- if ($new_page) {
- $new_page = 0;
+ if (my ($title) = /^## (.*) ##$/) {
$log_class = "step";
- if (my ($name, $product) = /^Saving(?:\s+([^:]*):)?\s+(.*)$/) {
- my $href = "$product/index.html";
+ if (my ($name, $product) = $title =~ /^Saving(?:\s+([^:]*):)?\s+(.*)$/) {
+ my $href = "$product/summary.html";
$href = $product if ! -e $href;
my (%p);
}
close (DIST);
}
- } else {
+ } elsif ($title eq 'Success') {
+ $result = 'success';
+ } elsif ($title !~ /^-+$/) {
my (%s);
- $s{TITLE} = $_;
+ $s{TITLE} = $title;
$s{LN} = $ln;
push (@steps, \%s);
}
- $result = 'success' if $_ eq 'Success';
} else {
- if (my ($diagnostic) = /(error|warning):/i) {
+ my $diagnostic;
+ $diagnostic = "error" if /error:/i || /FAILED/;
+ $diagnostic = "warning" if /warning:/i;
+ if ($diagnostic) {
my (%d);
- $d{DIAGNOSTIC} = lc ($diagnostic);
+ $d{DIAGNOSTIC} = $diagnostic;
$d{MESSAGE} = $_;
$d{LN} = $ln;
}
}
push (@{$steps[$#steps]{CHILDREN}}, \%d);
-
- $log_class = "$diagnostic";
}
}
printf LOG_HTML "<a name=\"%d\"><tt>%4d</tt></a> ", $ln, $ln;
}
}
-open (INDEX, '>','index.html');
+open (INDEX, '>','summary.html');
print INDEX <<EOF;
<html>
<body>
EOF
-print INDEX "<h1>Build ", $vars{"build_number"}, ": $result</h1>\n";
+print INDEX "<h1>Build ", $vars{"BUILD_NUMBER"}, ": $result</h1>\n";
print INDEX "<h2>Build Properties</h2>\n";
print INDEX "<table>\n";