Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fc1943s committed Apr 23, 2024
1 parent 4f21e67 commit e1d24c2
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 180 deletions.
15 changes: 8 additions & 7 deletions apps/builder/Builder.dib
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,8 @@ let inline buildProject runtime outputDir path = async {
runtimes
|> List.map (fun runtime -> async {
let command = $@"dotnet publish ""{path}"" --configuration Release --output ""{outputDir}"" --runtime {runtime}"
let! exitCode, result =
let! exitCode, _result =
SpiralRuntime.execute_with_options_async struct (None, command, None, Some fileDir)
if exitCode > 0 then
let! text = fullPath |> SpiralFileSystem.read_all_text_async
trace Critical
(fun () -> "buildProject")
(fun () -> $"text: {text} / result: {result} / {_locals ()}")
return exitCode
})
|> Async.Sequential
Expand Down Expand Up @@ -147,7 +142,13 @@ let inline persistCodeProject packages modules name code = async {

let inline buildCode runtime packages modules outputDir name code = async {
let! fsprojPath = code |> persistCodeProject packages modules name
return! fsprojPath |> buildProject runtime outputDir
let! exitCode = fsprojPath |> buildProject runtime outputDir
if exitCode > 0 then
let! fsprojText = fsprojPath |> SpiralFileSystem.read_all_text_async
trace Critical
(fun () -> "buildCode")
(fun () -> $"code: {code} / fsprojText: {fsprojText} / {_locals ()}")
return exitCode
}

#!fsharp
Expand Down
Loading

0 comments on commit e1d24c2

Please sign in to comment.