Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
17 changes: 15 additions & 2 deletions build/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <inheritdoc /> with the documentation
//from their interfaces
Expand Down