mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Cleanup cake process logging (#1293)
This commit is contained in:
11
build.cake
11
build.cake
@@ -220,14 +220,17 @@ Task("BuildTest")
|
||||
{
|
||||
var project = pair.Key;
|
||||
var projectFolder = System.IO.Path.Combine(testFolder, project);
|
||||
var runLog = new List<string>();
|
||||
Run(dotnetcli, $"build --framework {framework} --configuration {testConfiguration} \"{projectFolder}\"",
|
||||
var logPath = System.IO.Path.Combine(logFolder, $"{project}-{framework}-build.log");
|
||||
using (var logWriter = new StreamWriter(logPath)) {
|
||||
Run(dotnetcli, $"build --framework {framework} --configuration {testConfiguration} \"{projectFolder}\"",
|
||||
new RunOptions
|
||||
{
|
||||
StandardOutputListing = runLog
|
||||
StandardOutputWriter = logWriter,
|
||||
StandardErrorWriter = logWriter
|
||||
})
|
||||
.ExceptionOnError($"Building test {project} failed for {framework}.");
|
||||
System.IO.File.WriteAllLines(System.IO.Path.Combine(logFolder, $"{project}-{framework}-build.log"), runLog.ToArray());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user