Skip to content

Commit 9b3efa7

Browse files
committed
Merge branch '2.x' into feature/2.x-analyze-body
# Conflicts: # src/Tests/Indices/Analyze/AnalyzeApiTests.cs
2 parents 744dbfc + 1206a9c commit 9b3efa7

File tree

327 files changed

+6096
-3574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+6096
-3574
lines changed

NuGet.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<configuration>
33
<packageSources>
44
<add key="Temp DiffPlex Feed" value="https://www.myget.org/F/diffplex-temp/api/v3/index.json" />
5+
<add key="Xunit myget" value="https://www.myget.org/F/xunit/api/v3/index.json" />
56
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
67
</packageSources>
7-
</configuration>
8+
</configuration>

build.bat

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ REM build build [skiptests]
55
REM build release [version] [skiptests]
66
REM build version [version] [skiptests]
77
REM build integrate [elasticsearch_versions] [skiptests]
8+
REM build canary [apikey] [feed] [skiptests]
89

910
REM - elasticsearch_versions can be multiple separated with a semi-colon ';'
1011

@@ -20,9 +21,9 @@ if errorlevel 1 (
2021
SET TARGET="build"
2122
SET VERSION=
2223
SET ESVERSIONS=
23-
SET DNXVERSION="default"
2424
SET SKIPTESTS=0
2525
SET APIKEY=
26+
SET APIKEYPROVIDED="<empty>"
2627
SET FEED="elasticsearch-net"
2728

2829
IF /I "%1"=="skiptests" (
@@ -50,8 +51,15 @@ IF /I "%1%"=="integrate" (
5051
)
5152

5253
IF /I "%1%"=="canary" (
53-
IF NOT [%2]==[] (set APIKEY="%2")
54-
IF NOT [%3]==[] (set FEED="%3")
54+
IF NOT [%2]==[] IF NOT "%2"=="skiptests" (
55+
set APIKEY="%2"
56+
SET APIKEYPROVIDED="<redacted>"
57+
)
58+
IF NOT [%3]==[] IF NOT "%3"=="skiptests" set FEED="%3"
59+
IF /I "%4"=="skiptests" (set SKIPTESTS=1)
60+
IF /I "%3"=="skiptests" (set SKIPTESTS=1)
61+
IF /I "%2"=="skiptests" (set SKIPTESTS=1)
5562
)
5663

64+
ECHO starting build using target=%TARGET% version=%VERSION% esversions=%ESVERSIONS% skiptests=%SKIPTESTS% apiKey=%APIKEYPROVIDED% feed=%FEED%
5765
"packages\build\FAKE\tools\Fake.exe" "build\\scripts\\Targets.fsx" "target=%TARGET%" "version=%VERSION%" "esversions=%ESVERSIONS%" "skiptests=%SKIPTESTS%" "apiKey=%APIKEY%" "feed=%FEED%"

build/Elasticsearch.Net.nuspec

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@
3030
</dependencies>
3131
</metadata>
3232
<files>
33-
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.dll" target="lib\net45"/>
34-
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.pdb" target="lib\net45"/>
35-
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.pdb.srcsrv" target="lib\net45"/>
36-
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.XML" target="lib\net45"/>
33+
<file src="output\v4.5\Elasticsearch.Net\Elasticsearch.Net.dll" target="lib\net45"/>
34+
<file src="output\v4.5\Elasticsearch.Net\Elasticsearch.Net.pdb" target="lib\net45"/>
35+
<file src="output\v4.5\Elasticsearch.Net\Elasticsearch.Net.pdb.srcsrv" target="lib\net45"/>
36+
<file src="output\v4.5\Elasticsearch.Net\Elasticsearch.Net.XML" target="lib\net45"/>
3737

38-
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.dll" target="lib\net46"/>
39-
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.pdb" target="lib\net46"/>
40-
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.pdb.srcsrv" target="lib\net46"/>
41-
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.XML" target="lib\net46"/>
38+
<file src="output\v4.6\Elasticsearch.Net\Elasticsearch.Net.dll" target="lib\net46"/>
39+
<file src="output\v4.6\Elasticsearch.Net\Elasticsearch.Net.pdb" target="lib\net46"/>
40+
<file src="output\v4.6\Elasticsearch.Net\Elasticsearch.Net.pdb.srcsrv" target="lib\net46"/>
41+
<file src="output\v4.6\Elasticsearch.Net\Elasticsearch.Net.XML" target="lib\net46"/>
4242

43-
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.dll" target="lib\netstandard1.3"/>
44-
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.pdb" target="lib\netstandard1.3"/>
45-
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.pdb.srcsrv" target="lib\netstandard1.3"/>
43+
<file src="output\netstandard1.3\Elasticsearch.Net\Elasticsearch.Net.dll" target="lib\netstandard1.3"/>
44+
<file src="output\netstandard1.3\Elasticsearch.Net\Elasticsearch.Net.pdb" target="lib\netstandard1.3"/>
45+
<file src="output\netstandard1.3\Elasticsearch.Net\Elasticsearch.Net.pdb.srcsrv" target="lib\netstandard1.3"/>
4646
</files>
4747
</package>

build/NEST.nuspec

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@
3535
</dependencies>
3636
</metadata>
3737
<files>
38-
<file src="output\Nest\net45\Nest.dll" target="lib\net45"/>
39-
<file src="output\Nest\net45\Nest.pdb" target="lib\net45"/>
40-
<file src="output\Nest\net45\Nest.pdb.srcsrv" target="lib\net45"/>
41-
<file src="output\Nest\net45\Nest.XML" target="lib\net45"/>
38+
<file src="output\v4.5\Nest\Nest.dll" target="lib\net45"/>
39+
<file src="output\v4.5\Nest\Nest.pdb" target="lib\net45"/>
40+
<file src="output\v4.5\Nest\Nest.pdb.srcsrv" target="lib\net45"/>
41+
<file src="output\v4.5\Nest\Nest.XML" target="lib\net45"/>
4242

43-
<file src="output\Nest\net46\Nest.dll" target="lib\net46"/>
44-
<file src="output\Nest\net46\Nest.pdb" target="lib\net46"/>
45-
<file src="output\Nest\net46\Nest.pdb.srcsrv" target="lib\net46"/>
46-
<file src="output\Nest\net46\Nest.XML" target="lib\net46"/>
43+
<file src="output\v4.6\Nest\Nest.dll" target="lib\net46"/>
44+
<file src="output\v4.6\Nest\Nest.pdb" target="lib\net46"/>
45+
<file src="output\v4.6\Nest\Nest.pdb.srcsrv" target="lib\net46"/>
46+
<file src="output\v4.6\Nest\Nest.XML" target="lib\net46"/>
4747

48-
<file src="output\Nest\netstandard1.3\Nest.dll" target="lib\netstandard1.3"/>
49-
<file src="output\Nest\netstandard1.3\Nest.pdb" target="lib\netstandard1.3"/>
50-
<file src="output\Nest\netstandard1.3\Nest.pdb.srcsrv" target="lib\netstandard1.3"/>
48+
<file src="output\netstandard1.3\Nest\Nest.dll" target="lib\netstandard1.3"/>
49+
<file src="output\netstandard1.3\Nest\Nest.pdb" target="lib\netstandard1.3"/>
50+
<file src="output\netstandard1.3\Nest\Nest.pdb.srcsrv" target="lib\netstandard1.3"/>
5151
</files>
5252
</package>

build/scripts/Building.fsx

Lines changed: 40 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,69 +2,63 @@
22
#r @"FakeLib.dll"
33

44
#load @"Paths.fsx"
5-
#load @"Projects.fsx"
6-
open System
75

86
open Fake
97

108
open Paths
119
open Projects
12-
13-
let gitLink pdbDir projectName =
14-
let exe = Paths.Tool("gitlink/lib/net45/GitLink.exe")
15-
ExecProcess(fun p ->
16-
p.FileName <- exe
17-
p.Arguments <- sprintf @". -u %s -d %s -include %s" Paths.Repository pdbDir projectName
18-
) (TimeSpan.FromMinutes 5.0) |> ignore
10+
open Tooling;
1911

2012
type Build() =
2113

22-
static let allProjects = DotNetProject.All |> Seq.map(fun p -> p.Name)
14+
static let runningRelease = hasBuildParam "version" || hasBuildParam "apikey" || getBuildParam "target" = "canary" || getBuildParam "target" = "release"
2315

24-
static let compileCore projects =
25-
projects
16+
static let compileCore() =
17+
DotNetProject.AllPublishable
2618
|> Seq.iter(fun p ->
27-
let path = (Paths.Quote (Paths.ProjectJson p))
28-
Tooling.DotNet.Exec Tooling.DotNetRuntime.Core Build.BuildFailure p ["restore"; path; "--verbosity Warning"]
29-
Tooling.DotNet.Exec Tooling.DotNetRuntime.Core Build.BuildFailure p ["build"; path; "--configuration Release"]
30-
)
19+
let path = Paths.ProjectJson p.Name
20+
let o = Paths.ProjectOutputFolder p DotNetFramework.NetStandard1_3
21+
DotNet.Exec ["restore"; path; "--verbosity Warning"]
22+
DotNet.Exec ["build"; path; "--configuration Release"; "-o"; o; "-f"; DotNetFramework.NetStandard1_3.Identifier.MSBuild]
23+
)
3124

32-
static let compileDesktop projects =
33-
projects
34-
|> Seq.iter(fun project ->
35-
Tooling.MsBuild.Exec (Paths.Net45BinFolder project) "Rebuild" Tooling.DotNetFramework.Net45.Identifier [Paths.CsProj(project)]
36-
Tooling.MsBuild.Exec (Paths.Net46BinFolder project) "Rebuild" Tooling.DotNetFramework.Net46.Identifier [Paths.CsProj(project)]
37-
)
25+
static let compileDesktop target =
26+
MsBuild.Build(target, DotNetFramework.Net45.Identifier)
27+
MsBuild.Build(target, DotNetFramework.Net46.Identifier)
3828

39-
static let copyToOutput projects =
40-
projects
29+
static let gitLink() =
30+
DotNetProject.AllPublishable
4131
|> Seq.iter(fun p ->
42-
let projectName = (p |> directoryInfo).Name
43-
let outputFolder = Paths.Output(projectName)
44-
let binFolder = Paths.BinFolder(projectName)
45-
if not isMono then
46-
match projectName with
47-
| "Nest"
48-
| "Elasticsearch.Net" ->
49-
gitLink (Paths.Net45BinFolder projectName) projectName
50-
gitLink (Paths.Net46BinFolder projectName) projectName
51-
gitLink (Paths.NetStandard13BinFolder projectName) projectName
52-
| _ -> ()
53-
CopyDir outputFolder binFolder allFiles
32+
let projectName = (p.Name |> directoryInfo).Name
33+
let link framework =
34+
//TC sets these so gitlink does not need to recreate
35+
let branch = environVarOrNone "GITBRANCH"
36+
let commit = environVarOrNone "GITCOMMIT"
37+
let args = Seq.empty
38+
|> match branch with
39+
| Some b -> Seq.append ["-b"; b]
40+
| None -> Seq.append Seq.empty
41+
|> match commit with
42+
| Some c -> Seq.append ["-s"; c]
43+
| None -> Seq.append Seq.empty
44+
|> Seq.append ["."; "-u"; Paths.Repository; "-d"; (Paths.ProjectOutputFolder p framework); "-include"; projectName]
45+
GitLink.Exec ["."; "-u"; Paths.Repository; "-d"; (Paths.ProjectOutputFolder p framework); "-include"; projectName]
46+
|> ignore
47+
link DotNetFramework.Net45
48+
link DotNetFramework.Net46
49+
link DotNetFramework.NetStandard1_3
5450
)
5551

56-
static member BuildFailure errors =
57-
raise (BuildException("The project build failed.", errors |> List.ofSeq))
52+
static let compile target =
53+
compileDesktop target
54+
//we only need this output when doing a release otherwise depend on test to validate the build
55+
if runningRelease then compileCore()
56+
if not isMono && runningRelease then gitLink()
5857

59-
static member QuickCompile() =
60-
compileDesktop allProjects
61-
compileCore allProjects
58+
static member QuickCompile() = compile "Build"
6259

63-
static member Compile() =
64-
compileDesktop allProjects
65-
compileCore allProjects
66-
copyToOutput allProjects
60+
static member Compile() = compile "Rebuild"
6761

6862
static member Clean() =
6963
CleanDir Paths.BuildOutput
70-
allProjects |> Seq.iter(fun p -> CleanDir(Paths.BinFolder p))
64+
DotNetProject.All |> Seq.iter(fun p -> CleanDir(Paths.BinFolder p.Name))

0 commit comments

Comments
 (0)