Skip to content

Commit f35e92a

Browse files
committed
Merge pull request #1188 from elasticsearch/feature/gitlink
Feature/gitlink
2 parents 7cad848 + 24278e8 commit f35e92a

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

build.bat

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ if not exist build\tools\FAKE\tools\Fake.exe (
1212
"build\tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
1313
)
1414

15-
"build\tools\nuget\nuget.exe" "install" "gitlink" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
15+
if not exist build\tools\gitlink\lib\net45\gitlink.exe (
16+
ECHO Local node not found.. Installing..
17+
"build\tools\nuget\nuget.exe" "install" "gitlink" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
18+
)
1619

1720
REM we need nunit-console to run our tests
1821
if not exist build\tools\NUnit.Runners\tools\nunit-console.exe (

build/build.fsx

+15-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ Target "Clean" (fun _ ->
2020
CleanDir buildDir
2121
)
2222

23+
let gitLink = fun _ ->
24+
let exe = "build/tools/gitlink/lib/net45/GitLink.exe"
25+
ExecProcess(fun p ->
26+
p.FileName <- exe
27+
p.Arguments <- sprintf @". -u https://github.com/elasticsearch/elasticsearch-net -b develop"
28+
) (TimeSpan.FromMinutes 5.0) |> ignore
29+
2330
Target "BuildApp" (fun _ ->
2431
let binDirs = !! "src/**/bin/**"
2532
|> Seq.map DirectoryName
@@ -34,10 +41,16 @@ Target "BuildApp" (fun _ ->
3441
("PreBuildEvent","echo");
3542
]
3643

37-
//Compile each csproj and output it seperately in build/output/PROJECTNAME
44+
MSBuild null "Rebuild" msbuildProperties (seq { yield "src/Elasticsearch.sln" })
45+
if not isMono then gitLink()
46+
47+
//moves all the release builds to build/output/PROJECTNAME
3848
!! "src/**/*.csproj"
3949
|> Seq.map(fun f -> (f, buildDir + directoryInfo(f).Name.Replace(".csproj", "")))
40-
|> Seq.iter(fun (f,d) -> MSBuild d "Build" msbuildProperties (seq { yield f }) |> ignore)
50+
|> Seq.iter(fun (f,d) ->
51+
CreateDir d
52+
CopyDir d (directoryInfo(f).Parent.FullName + @"/bin/Release") allFiles
53+
)
4154

4255
//Scan for xml docs and patch them to replace <inheritdoc /> with the documentation
4356
//from their interfaces

0 commit comments

Comments
 (0)