Sha256: ebe75aeaf2c65bd68e7beeffe928322bacb89bff13225bb32deadccae4f2e9cd

Contents?: true

Size: 1.79 KB

Versions: 184

Compression:

Stored size: 1.79 KB

Contents

// Include Fake library
#r "./packages/FAKE/tools/FakeLib.dll"

open Fake
open Fake.Testing.NUnit3

// Directories
let buildDir  = "./build/"
let sourceDir = "./exercises/"

// Files
let solutionFile = buildDir @@ "/exercises.fsproj"
let compiledOutput = buildDir @@ "xfsharp.dll"
let nunitToJunitTransformFile = "./paket-files" @@ "nunit" @@ "nunit-transforms" @@ "nunit3-junit" @@ "nunit3-junit.xslt"

// Targets
Target "Clean" (fun _ ->
    CleanDirs [buildDir]
)

Target "Copy" (fun _ -> CopyDir buildDir sourceDir allFiles)

Target "BuildUnchanged" (fun _ ->
    MSBuildRelease buildDir "Build" [solutionFile]
    |> Log "Build unchanged: "
)

Target "PrepareTests" (fun _ ->
    let ignorePattern = "(\[<Ignore\(\"Remove to run test\"\)>\]|, Ignore = \"Remove to run test case\")"

    !! (buildDir @@ "**/*Test.fs")
    |> RegexReplaceInFilesWithEncoding ignorePattern "" System.Text.Encoding.UTF8
)

Target "BuildWithAllTests" (fun _ ->
    MSBuildRelease buildDir "Rebuild" [solutionFile]
    |> Log "Build with tests: "
)

Target "Test" (fun _ ->
    if getEnvironmentVarAsBool "APPVEYOR" then
        [compiledOutput]
        |> NUnit3 (fun p -> { p with 
                                ShadowCopy = false
                                ToolPath = "nunit3-console.exe" })
    else if getEnvironmentVarAsBool "CIRCLECI" then
        [compiledOutput]
        |> NUnit3 (fun p -> { p with 
                                ShadowCopy = false
                                ResultSpecs = [sprintf "junit-results.xml;transform=%s" nunitToJunitTransformFile] })
    else
        [compiledOutput]
        |> NUnit3 (fun p -> { p with ShadowCopy = false })
)

// Build order
"Clean" 
  ==> "Copy"
  ==> "BuildUnchanged"
  ==> "PrepareTests"
  ==> "BuildWithAllTests"    
  ==> "Test"

// Start build
RunTargetOrDefault "Test"

Version data entries

184 entries across 184 versions & 1 rubygems

Version Path
trackler-2.1.0.24 tracks/fsharp/build.fsx
trackler-2.1.0.23 tracks/fsharp/build.fsx
trackler-2.1.0.22 tracks/fsharp/build.fsx
trackler-2.1.0.21 tracks/fsharp/build.fsx
trackler-2.1.0.20 tracks/fsharp/build.fsx
trackler-2.1.0.19 tracks/fsharp/build.fsx
trackler-2.1.0.18 tracks/fsharp/build.fsx
trackler-2.1.0.17 tracks/fsharp/build.fsx
trackler-2.1.0.16 tracks/fsharp/build.fsx
trackler-2.1.0.15 tracks/fsharp/build.fsx
trackler-2.1.0.14 tracks/fsharp/build.fsx
trackler-2.1.0.13 tracks/fsharp/build.fsx
trackler-2.1.0.12 tracks/fsharp/build.fsx
trackler-2.1.0.11 tracks/fsharp/build.fsx
trackler-2.1.0.10 tracks/fsharp/build.fsx
trackler-2.1.0.9 tracks/fsharp/build.fsx
trackler-2.1.0.8 tracks/fsharp/build.fsx
trackler-2.1.0.7 tracks/fsharp/build.fsx
trackler-2.1.0.6 tracks/fsharp/build.fsx
trackler-2.1.0.5 tracks/fsharp/build.fsx