Skip to content

Commit

Permalink
Merge pull request #23 from Xliff/master
Browse files Browse the repository at this point in the history
- Adds creation of overview.md to Blin
  • Loading branch information
AlexDaniel committed Apr 12, 2020
2 parents b495ad0 + 2049de6 commit 751aacd
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions bin/blin.p6
Expand Up @@ -73,6 +73,7 @@ my $semaphore;

my $output-path = β€˜output’.IO;
my $overview-path = $output-path.add: β€˜overview’;
my $markdown-path = $output-path.add: 'failures.md';
my $dot-path = $output-path.add: β€˜overview.dot’;
my $svg-path = $output-path.add: β€˜overview.svg’;
my $json-path = $output-path.add: β€˜data.json’;
Expand Down Expand Up @@ -364,11 +365,12 @@ note β€˜πŸ₯žπŸ₯ž Saving the overview’;

sub save-overview {
$save-lock.protect: {
spurt $overview-path, @modules.sort(*.name).map({
my @sorted-modules = @modules.sort(*.name);
spurt $overview-path, @sorted-modules.map({
my $result = .done ?? .done.result !! Unknown;
my $line = β€œ{.name} – $result”;
if $result == Fail {
$line ~= β€œ, Bisected: {.bisected}”;
$line ~= β€œ, Bisected: { .bisected }”;
spurt $output-path.add(β€˜output_’ ~ .handle), .output-new;
}
$line
Expand All @@ -379,6 +381,40 @@ sub save-overview {
save-overview;


note 'πŸ₯žπŸ₯ž Saving the failure output';
sub save-markdown {
my $markdown-output = '';

for @modules.sort({
$^a.bisected cmp $^b.bisected || $^a.name cmp $^b.name
}) {
next unless (my $result = .done ?? .done.result !! Unknown) == Fail;

$markdown-output ~= qq:to/EOM/.chomp;
* [ ] [{ .name }](https://modules.raku.org/dist/{ .name }) – { $result }, { ''
} Bisected: { .bisected }
<details><Summary>Old Output</summary>
```
{ .output-old.indent(2) }
```
</details>
<details>
<summary>New Output</summary>
```
{ .output-new.indent(2) }
```
</details>
EOM

spurt $markdown-path, $markdown-output;
}
}

save-markdown;


note β€˜πŸ₯žπŸ₯ž Saving the json output’;
{
my %json-data;
Expand Down

0 comments on commit 751aacd

Please sign in to comment.