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.45 tracks/fsharp/build.fsx
trackler-2.1.0.44 tracks/fsharp/build.fsx
trackler-2.1.0.43 tracks/fsharp/build.fsx
trackler-2.1.0.42 tracks/fsharp/build.fsx
trackler-2.1.0.41 tracks/fsharp/build.fsx
trackler-2.1.0.40 tracks/fsharp/build.fsx
trackler-2.1.0.39 tracks/fsharp/build.fsx
trackler-2.1.0.38 tracks/fsharp/build.fsx
trackler-2.1.0.37 tracks/fsharp/build.fsx
trackler-2.1.0.36 tracks/fsharp/build.fsx
trackler-2.1.0.34 tracks/fsharp/build.fsx
trackler-2.1.0.33 tracks/fsharp/build.fsx
trackler-2.1.0.32 tracks/fsharp/build.fsx
trackler-2.1.0.31 tracks/fsharp/build.fsx
trackler-2.1.0.30 tracks/fsharp/build.fsx
trackler-2.1.0.29 tracks/fsharp/build.fsx
trackler-2.1.0.28 tracks/fsharp/build.fsx
trackler-2.1.0.27 tracks/fsharp/build.fsx
trackler-2.1.0.26 tracks/fsharp/build.fsx
trackler-2.1.0.25 tracks/fsharp/build.fsx