Skip to content

Commit ac64303

Browse files
committed
improve(mcl.commands.ci_matrix): Log GH comment file location
1 parent aa2c41a commit ac64303

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/mcl/src/src/mcl/commands/ci_matrix.d

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import core.cpuid : threadsPerCPU;
1313
import std.process : pipeProcess, wait, Redirect, kill;
1414
import std.exception : enforce;
1515
import std.format : fmt = format;
16-
import std.logger : tracef;
16+
import std.logger : tracef, infof;
1717

1818
import mcl.utils.env : optional, MissingEnvVarsException, parseEnv;
1919
import mcl.utils.string : enumToString, StringRepresentation, MaxWidth, writeRecordAsTable;
@@ -419,14 +419,19 @@ unittest
419419

420420
void saveGHCIComment(SummaryTableEntry[] tableSummaryJSON)
421421
{
422+
import std.path : buildPath, absolutePath;
423+
422424
string comment = "Thanks for your Pull Request!";
423425
comment ~= "\n\nBelow you will find a summary of the cachix status of each package, for each supported platform.";
424426
comment ~= "\n\n| package | `x86_64-linux` | `x86_64-darwin` | `aarch64-darwin` |";
425427
comment ~= "\n| ------- | -------------- | --------------- | ---------------- |";
426428
comment ~= tableSummaryJSON.map!(
427429
pkg => "\n| " ~ pkg.name ~ " | " ~ pkg.x86_64.linux ~ " | " ~ pkg.x86_64.darwin ~ " | " ~ pkg.aarch64.darwin ~ " |")
428430
.join("");
429-
(rootDir() ~ "comment.md").write(comment);
431+
432+
auto outputPath = rootDir().buildPath("comment.md").absolutePath;
433+
write(outputPath, comment);
434+
infof("Wrote GitHub comment file to '%s'", outputPath);
430435
}
431436

432437
@("saveGHCIComment")

0 commit comments

Comments
 (0)