author reports able to be made
This commit is contained in:
parent
9a8857203b
commit
a340a97095
4 changed files with 52 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,3 +2,5 @@ cache.stor
|
|||
*.swp
|
||||
logs/*
|
||||
#*.stor
|
||||
reports/files/
|
||||
*.html
|
||||
|
|
BIN
everything.stor
BIN
everything.stor
Binary file not shown.
48
reports/author.pl
Executable file
48
reports/author.pl
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use v5.24.0;
|
||||
use strict;
|
||||
#use warnings;
|
||||
|
||||
use Data::Dumper;
|
||||
use Storable;
|
||||
use lib '../lib';
|
||||
use Dist;
|
||||
use Template;
|
||||
|
||||
my $data = retrieve '../everything.stor';
|
||||
|
||||
my %auths;
|
||||
|
||||
for my $mod ($data->{modules}->@*) {
|
||||
my ($tested, $status) = $data->{jobstatus}{$mod}->@{qw/tested status/};
|
||||
$tested = !!$tested ? "yes" : "no";
|
||||
$status //= "";
|
||||
|
||||
my $log = "";
|
||||
if ($status && $status ne 'success') {
|
||||
my $failure = $status =~ /inc/ ? 'incfailure' : 'genfailure';
|
||||
$log = "<a href='/logs/${mod}_$failure.log'>here</a>"
|
||||
}
|
||||
|
||||
my $author = Dist::get_author($mod) // '__UNKNOWN__';
|
||||
|
||||
push $auths{$author}->@*, {
|
||||
name => $mod,
|
||||
author => $author,
|
||||
status => $status,
|
||||
tested => $tested,
|
||||
dist => $Dist::mod_to_dist{$mod} // $mod,
|
||||
log => $log
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
my $tt = Template->new();
|
||||
for my $auth (keys %auths) {
|
||||
my $vars = {
|
||||
modules => $auths{$auth},
|
||||
};
|
||||
|
||||
$tt->process('template.tt.html', $vars, "files/$auth.html");
|
||||
}
|
|
@ -36,6 +36,8 @@ for my $mod ($data->{modules}->@*) {
|
|||
|
||||
my $author = Dist::get_author($mod);
|
||||
|
||||
next unless $status =~ /inc/;
|
||||
|
||||
push @mods, {
|
||||
name => $mod,
|
||||
author => $author,
|
||||
|
|
Loading…
Add table
Reference in a new issue