diff --git a/build.bat b/build.bat index 70ac10aba2c..25c37174e20 100644 --- a/build.bat +++ b/build.bat @@ -12,7 +12,10 @@ if not exist build\tools\FAKE\tools\Fake.exe ( "build\tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease" ) -"build\tools\nuget\nuget.exe" "install" "gitlink" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease" +if not exist build\tools\gitlink\lib\net45\gitlink.exe ( + ECHO Local node not found.. Installing.. + "build\tools\nuget\nuget.exe" "install" "gitlink" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease" +) REM we need nunit-console to run our tests if not exist build\tools\NUnit.Runners\tools\nunit-console.exe ( diff --git a/build/build.fsx b/build/build.fsx index 5e706c7e2f8..a5551a5427d 100644 --- a/build/build.fsx +++ b/build/build.fsx @@ -20,6 +20,13 @@ Target "Clean" (fun _ -> CleanDir buildDir ) +let gitLink = fun _ -> + let exe = "build/tools/gitlink/lib/net45/GitLink.exe" + ExecProcess(fun p -> + p.FileName <- exe + p.Arguments <- sprintf @". -u https://github.com/elasticsearch/elasticsearch-net -b develop" + ) (TimeSpan.FromMinutes 5.0) |> ignore + Target "BuildApp" (fun _ -> let binDirs = !! "src/**/bin/**" |> Seq.map DirectoryName @@ -34,10 +41,16 @@ Target "BuildApp" (fun _ -> ("PreBuildEvent","echo"); ] - //Compile each csproj and output it seperately in build/output/PROJECTNAME + MSBuild null "Rebuild" msbuildProperties (seq { yield "src/Elasticsearch.sln" }) + if not isMono then gitLink() + + //moves all the release builds to build/output/PROJECTNAME !! "src/**/*.csproj" |> Seq.map(fun f -> (f, buildDir + directoryInfo(f).Name.Replace(".csproj", ""))) - |> Seq.iter(fun (f,d) -> MSBuild d "Build" msbuildProperties (seq { yield f }) |> ignore) + |> Seq.iter(fun (f,d) -> + CreateDir d + CopyDir d (directoryInfo(f).Parent.FullName + @"/bin/Release") allFiles + ) //Scan for xml docs and patch them to replace with the documentation //from their interfaces