<commit_before>#I "packages/FAKE/tools"
#r "FakeLib.dll"

open Fake

let projFiles =
  !! "./PclUnit/*.csproj" //PclUnit
    ++ "./Contrib/PclUnit.*/*.*proj" //Styles
    ++ "./Runner/pclunit-runner/*.csproj" //AggregateRunner
    ++ "./Runner/Platforms/**/*-xap*.csproj" //environment first
    ++ "./Runner/Platforms/**/*.csproj" //platform runners
    -- if isMono then
          "./Runner/Platforms/sl/**/*.csproj" //sliverlight runners
       else
          "./runner/Platforms/mono*/**/*.csproj" //mono runners
    ++ "./WhoTestsTheTesters/**/*.*proj"
    -- if isMono then
          "./WhoTestsTheTesters/Tests/Silverlight*/*.csproj"
       else
          "./WhoTestsTheTesters/Tests/Mono*/*.csproj"


Target "Clean" (fun () ->
    trace " --- Cleaning stuff --- "

    let buildMode = getBuildParamOrDefault "buildMode" "Release"
    let setParams defaults =
            { defaults with
                Verbosity = Some(Quiet)
                Targets = ["Clean"]
                Properties =
                    [
                        "Optimize", "True"
                        "DebugSymbols", "True"
                        "Configuration", buildMode
                        "FSharpBad", isMono.ToString()
                    ]
             }
    projFiles
      |> Seq.iter (build setParams)

)

Target "Build" (fun () ->
    trace " --- Building the app --- "
    let buildMode = getBuildParamOrDefault "buildMode" "Release"
    let setParams defaults =
            { defaults with
                Verbosity = Some(Quiet)
                Targets = ["Build"]
                Properties =
                    [
                        "Optimize", "True"
                        "DebugSymbols", "True"
                        "Configuration", buildMode
                        "FSharpBad", isMono.ToString()
                    ]
             }

    projFiles
      |> Seq.iter (build setParams)

)

Target "Test" (fun () ->
    trace " --- Testing app --- "

    CopyFile "./Runner/pclunit-runner/platforms.release.yml" "./Runner/pclunit-runner/bin/Release/platforms.yml"

    let args =
      sprintf
        "runConfig ./WhoTestsTheTesters/Tests/RunTests%s.yml -o test.json --noerror"
        (if isMono then ".mono" else "")

    directExec (fun info ->
                       info.FileName <- "./Runner/pclunit-runner/bin/Release/pclunit-runner.exe"
                       info.Arguments <- args) |> ignore

    if not <| directExec (fun info ->
                       info.FileName <- "./WhoTestsTheTesters/ConventionTestProcessor/bin/Release/ConventionTestProcessor.exe"
                       info.Arguments <- "test.json") then
       failwith "Tests Failed"
<commit_msg>really really fix release yml<commit_after>#I "packages/FAKE/tools"
#r "FakeLib.dll"

open Fake

let projFiles =
  !! "./PclUnit/*.csproj" //PclUnit
    ++ "./Contrib/PclUnit.*/*.*proj" //Styles
    ++ "./Runner/pclunit-runner/*.csproj" //AggregateRunner
    ++ "./Runner/Platforms/**/*-xap*.csproj" //environment first
    ++ "./Runner/Platforms/**/*.csproj" //platform runners
    -- if isMono then
          "./Runner/Platforms/sl/**/*.csproj" //sliverlight runners
       else
          "./runner/Platforms/mono*/**/*.csproj" //mono runners
    ++ "./WhoTestsTheTesters/**/*.*proj"
    -- if isMono then
          "./WhoTestsTheTesters/Tests/Silverlight*/*.csproj"
       else
          "./WhoTestsTheTesters/Tests/Mono*/*.csproj"


Target "Clean" (fun () ->
    trace " --- Cleaning stuff --- "

    let buildMode = getBuildParamOrDefault "buildMode" "Release"
    let setParams defaults =
            { defaults with
                Verbosity = Some(Quiet)
                Targets = ["Clean"]
                Properties =
                    [
                        "Optimize", "True"
                        "DebugSymbols", "True"
                        "Configuration", buildMode
                        "FSharpBad", isMono.ToString()
                    ]
             }
    projFiles
      |> Seq.iter (build setParams)

)

Target "Build" (fun () ->
    trace " --- Building the app --- "
    let buildMode = getBuildParamOrDefault "buildMode" "Release"
    let setParams defaults =
            { defaults with
                Verbosity = Some(Quiet)
                Targets = ["Build"]
                Properties =
                    [
                        "Optimize", "True"
                        "DebugSymbols", "True"
                        "Configuration", buildMode
                        "FSharpBad", isMono.ToString()
                    ]
             }

    projFiles
      |> Seq.iter (build setParams)

)

Target "Test" (fun () ->
    trace " --- Testing app --- "

    "./Runner/pclunit-runner/platforms.release.yml" |> CopyFile "./Runner/pclunit-runner/bin/Release/platforms.yml"

    let args =
      sprintf
        "runConfig ./WhoTestsTheTesters/Tests/RunTests%s.yml -o test.json --noerror"
        (if isMono then ".mono" else "")

    directExec (fun info ->
                       info.FileName <- "./Runner/pclunit-runner/bin/Release/pclunit-runner.exe"
                       info.Arguments <- args) |> ignore

    if not <| directExec (fun info ->
                       info.FileName <- "./WhoTestsTheTesters/ConventionTestProcessor/bin/Release/ConventionTestProcessor.exe"
                       info.Arguments <- "test.json") then
       failwith "Tests Failed"

{'fraction_non_alphanumeric': 0.13775226809850027, 'fraction_numerical': 0.0, 'mean_word_length': 1.5290262172284643, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7205037', 'n_tokens_mistral': 1623, 'n_tokens_neox': 1498, 'n_words': 298}