@@ -7,17 +7,17 @@ RestorePackages()
77
88// Properties
99let version = " 0.9.9-pre" //TODO: find a way to extract this from somewhere convenient
10- let buildDir = " ./ build/ output/ "
11- let nugetPath = " .nuget/ nuget.exe"
12- let nugetOutDir = buildDir + " _packages/ "
10+ let buildDir = FileUtils.pwd () @@ " build" @@ " output"
11+ let nugetPath = FileUtils.pwd () @@ " .nuget" @@ " nuget.exe"
12+ let nugetOutDir = buildDir @@ " _packages"
1313
1414let BuildProperties =
1515 [
1616 " TargetPlatform" , " AnyCPU"
1717 " AllowUnsafeBlocks" , " true"
1818 ]
1919
20- Target " Clean" ( fun _ ->
20+ Target " Clean" ( fun _ ->
2121 CleanDir buildDir
2222)
2323// Default target
@@ -34,7 +34,7 @@ let buildProject mode =
3434
3535 //Compile each csproj and output it separately in build/output/PROJECTNAME
3636 !! " **/*.csproj"
37- |> Seq.map( fun f -> ( f, buildDir + directoryInfo( f) .Name.Replace( " .csproj" , " " )))
37+ |> Seq.map( fun f -> ( f, buildDir @@ directoryInfo( f) .Name.Replace( " .csproj" , " " )))
3838 |> Seq.iter( fun ( f , d ) -> MSBuild d " Build" ( BuildProperties @ [ " Configuration" , mode ]) ( seq { yield f }) |> ignore)
3939
4040Target " BuildAppRelease" ( fun _ ->
@@ -49,10 +49,10 @@ Target "BuildAppDebug" (fun _ ->
4949
5050Target " Test" ( fun _ ->
5151 traceHeader " RUNNING UNIT TESTS"
52- let testDir = buildDir + " tests/ "
52+ let testDir = buildDir @@ " tests"
5353 CreateDir testDir
5454 ActivateFinalTarget " CloseTestRunner"
55- !!( buildDir + " **/ *Test*.dll" )
55+ !! ( buildDir @@ " **" @@ " *Test*.dll" )
5656 //++(buildDir + "**/*Test*.exe")
5757 |> NUnit(
5858 fun p -> { p with DisableShadowCopy = true
@@ -63,7 +63,7 @@ Target "Test" (fun _ ->
6363 TimeOut = System.TimeSpan.FromMinutes 10.0
6464 ExcludeCategory = " LongRunning,LocalCluster" }))
6565
66- FinalTarget " CloseTestRunner" ( fun _ ->
66+ FinalTarget " CloseTestRunner" ( fun _ ->
6767 ProcessHelper.killProcess " nunit-agent.exe"
6868)
6969
@@ -79,22 +79,22 @@ let replaceVersionInNuspec nuspecFileName version =
7979
8080Target " BuildNuget" ( fun _ ->
8181 trace " Building Nuget Packages"
82- let projects = [ " FoundationDb.Client" ; " FoundationDb.Layers.Common" ]
82+ let projects = [ " FoundationDb.Client" ; " FoundationDb.Layers.Common" ]
8383 CreateDir nugetOutDir
8484 projects
8585 |> List.iter (
8686 fun name ->
87- let nuspec = sprintf @" build\ %s.nuspec" name
87+ let nuspec = " build " @@ ( sprintf " %s .nuspec" name)
8888 replaceVersionInNuspec nuspec version
89- let binariesDir = sprintf " %s / %s / " buildDir name
89+ let binariesDir = buildDir @@ name
9090 NuGetPack (
9191 fun p ->
9292 { p with WorkingDir = binariesDir
9393 OutputPath = nugetOutDir
9494 ToolPath = nugetPath
9595 Version = version}) nuspec
9696
97- let targetLoc = ( buildDir + ( sprintf " %s / %s .%s .nupkg" name name version))
97+ let targetLoc = ( buildDir @@ name @@ ( sprintf " %s .%s .nupkg" name version))
9898 trace targetLoc
9999
100100 (* MoveFile nugetOutDir (buildDir + (sprintf "%s/%s/.%s.nupkg" name name version))*)
@@ -109,4 +109,3 @@ Target "Default" (fun _ -> trace "Starting build")
109109
110110// start build
111111RunTargetOrDefault " Build"
112-
0 commit comments