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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _ReSharper*/
_NCrunch*/
[Tt]est[Rr]esult*

.fake/*
.fake/*
.fake
packages/*
paket.exe
Expand Down Expand Up @@ -69,7 +69,9 @@ YamlCache

launchSettings.json
# https://github.com/elastic/elasticsearch-net/pull/1822#issuecomment-183722698
*.project.lock.json
project.lock.json

.idea/
*.sln.iml
*.sln.iml
/src/.vs/restore.dg
49 changes: 36 additions & 13 deletions build/Elasticsearch.Net.nuspec
Original file line number Diff line number Diff line change
@@ -1,26 +1,49 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Elasticsearch.Net</id>
<version>2.0.0-alpha2</version>
<title>Elasticsearch.Net - official low level elasticsearch client</title>
<version>$version$</version>
<authors>Elastic and contributors</authors>
<owners>Elastic</owners>
<licenseUrl>https://github.com/elastic/elasticsearch-net/blob/master/license.txt</licenseUrl>
<projectUrl>https://github.com/elastic/elasticsearch-net</projectUrl>
<iconUrl>https://raw.githubusercontent.com/elastic/elasticsearch-net/master/build/nuget-icon.png</iconUrl>
<licenseUrl>https://github.com/elasticsearch/elasticsearch-net/blob/master/license.txt</licenseUrl>
<projectUrl>https://github.com/elasticsearch/elasticsearch-net</projectUrl>
<summary>
Exposes all the elasticsearch API endpoints but leaves you in control of building the request and response bodies. Comes with built in cluster failover/connection pooling support.
</summary>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
Exposes all the elasticsearch API endpoints but leaves you in control of building the request and response bodies. Comes with built in cluster failover/connection pooling support.
</description>
<tags>elasticsearch elastic search lucene nest</tags>
<description>Elasticsearch.Net</description>
<summary>Exposes all the elasticsearch API endpoints but leaves you in control of building the request and response bodies. Comes with built in cluster failover/connection pooling support.</summary>
<releaseNotes>See https://github.com/elastic/elasticsearch-net/releases/tag/$version$</releaseNotes>
<copyright>2014-2016 Elasticsearch BV</copyright>
<tags>elasticsearch,elastic,search,lucene,nest</tags>
<dependencies>
<group targetFramework=".NETFramework4.5" />
<group targetFramework=".NETFramework4.6">
<dependency id="System.Collections.Specialized" version="[4.0.1, )" />
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
</group>
<group targetFramework=".NETStandard1.3">
<dependency id="NETStandard.Library" version="[1.6.0, )" />
<dependency id="System.Collections.Specialized" version="[4.0.1, )" />
<dependency id="System.Runtime.Serialization.Primitives" version="[4.1.1, )" />
<dependency id="Microsoft.CSharp" version="[4.0.1, )" />
<dependency id="System.Dynamic.Runtime" version="[4.0.11, )" />
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
<dependency id="System.ComponentModel.TypeConverter" version="[4.1.0, )" />
</group>
</dependencies>
</metadata>
<files>
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.dll" target="lib\net45"/>
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.pdb" target="lib\net45"/>
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.pdb.srcsrv" target="lib\net45"/>
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.XML" target="lib\net45"/>

<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.dll" target="lib\net46"/>
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.pdb" target="lib\net46"/>
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.pdb.srcsrv" target="lib\net46"/>
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.XML" target="lib\net46"/>

<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.dll" target="lib\netstandard1.3"/>
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.pdb" target="lib\netstandard1.3"/>
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.pdb.srcsrv" target="lib\netstandard1.3"/>
</files>
</package>
50 changes: 39 additions & 11 deletions build/NEST.nuspec
Original file line number Diff line number Diff line change
@@ -1,26 +1,54 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>NEST</id>
<version>2.0.0-alpha2</version>
<title>NEST - Elasticsearch .NET client</title>
<version>$version$</version>
<authors>Elastic and contributors</authors>
<owners>Elastic</owners>
<licenseUrl>https://github.com/elastic/elasticsearch-net/blob/master/license.txt</licenseUrl>
<projectUrl>https://github.com/elastic/elasticsearch-net</projectUrl>
<iconUrl>https://raw.githubusercontent.com/elastic/elasticsearch-net/master/build/nuget-icon.png</iconUrl>
<licenseUrl>https://github.com/elasticsearch/elasticsearch-net/blob/master/license.txt</licenseUrl>
<projectUrl>https://github.com/elasticsearch/elasticsearch-net</projectUrl>
<summary>Strongly typed interface to Elasticsearch. Fluent and classic object initializer mappings of requests and responses. Uses and exposes Elasticsearch.Net</summary>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Strongly typed interface to Elasticsearch. Fluent and classic object initializer mappings of requests and responses. Uses and exposes Elasticsearch.Net</description>
<description>Nest</description>
<summary>Strongly typed interface to Elasticsearch. Fluent and classic object initializer mappings of requests and responses. Uses and exposes Elasticsearch.Net</summary>
<releaseNotes>See https://github.com/elastic/elasticsearch-net/releases/tag/$version$</releaseNotes>
<copyright>2014-2016 Elasticsearch BV</copyright>
<tags>elasticsearch,elastic,search,lucene,nest</tags>
<dependencies>
<dependency id="Elasticsearch.Net" version="2.0.0-alpha2"/>
<dependency id="Newtonsoft.Json" version="[8,9)" />
<group targetFramework=".NETFramework4.5">
<dependency id="Elasticsearch.Net" version="$version$" />
<dependency id="Newtonsoft.Json" version="[9,10)" />
</group>
<group targetFramework=".NETFramework4.6">
<dependency id="System.Collections.Specialized" version="[4.0.1, )" />
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
<dependency id="System.Linq.Queryable" version="[4.0.0, )" />
<dependency id="Elasticsearch.Net" version="$version$" />
<dependency id="Newtonsoft.Json" version="[9,10)" />
</group>
<group targetFramework=".NETStandard1.3">
<dependency id="NETStandard.Library" version="[1.6.0, )" />
<dependency id="System.Collections.Specialized" version="[4.0.1, )" />
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
<dependency id="System.Linq.Queryable" version="[4.0.1, )" />
<dependency id="Elasticsearch.Net" version="$version$" />
<dependency id="Newtonsoft.Json" version="[9,10)" />
</group>
</dependencies>
<tags>elasticsearch elastic search lucene nest</tags>
</metadata>
<files>
<file src="output\Nest\net45\Nest.dll" target="lib\net45"/>
<file src="output\Nest\net45\Nest.pdb" target="lib\net45"/>
<file src="output\Nest\net45\Nest.pdb.srcsrv" target="lib\net45"/>
<file src="output\Nest\net45\Nest.XML" target="lib\net45"/>

<file src="output\Nest\net46\Nest.dll" target="lib\net46"/>
<file src="output\Nest\net46\Nest.pdb" target="lib\net46"/>
<file src="output\Nest\net46\Nest.pdb.srcsrv" target="lib\net46"/>
<file src="output\Nest\net46\Nest.XML" target="lib\net46"/>

<file src="output\Nest\netstandard1.3\Nest.dll" target="lib\netstandard1.3"/>
<file src="output\Nest\netstandard1.3\Nest.pdb" target="lib\netstandard1.3"/>
<file src="output\Nest\netstandard1.3\Nest.pdb.srcsrv" target="lib\netstandard1.3"/>
</files>
</package>
62 changes: 32 additions & 30 deletions build/scripts/Building.fsx
Original file line number Diff line number Diff line change
@@ -1,56 +1,45 @@
#I @"../../packages/build/FAKE/tools"
#r @"FakeLib.dll"

#load @"Paths.fsx"
#load @"Projects.fsx"
open System

open Fake

open Paths
open Projects

let gitLink pdbDir projectName =
let exe = Paths.Tool("gitlink/lib/net45/GitLink.exe")
ExecProcess(fun p ->
p.FileName <- exe
p.Arguments <- sprintf @". -u %s -d %s -include %s" Paths.Repository pdbDir projectName
p.FileName <- exe
p.Arguments <- sprintf @". -u %s -d %s -include %s" Paths.Repository pdbDir projectName
) (TimeSpan.FromMinutes 5.0) |> ignore

type Build() =
//Override the prebuild event because it just calls a fake task BuildApp depends on anyways
static let msbuildProperties = [
("Configuration","Release");
("PreBuildEvent","echo");
]

static member QuickCompile() =
let projects = !! Paths.Source("*/project.json")
|> Seq.map DirectoryName
static let allProjects = DotNetProject.All |> Seq.map(fun p -> p.Name)

static let compileCore projects =
projects
|> Seq.iter(fun project ->
let path = (Paths.Quote project)
Tooling.Dnu.Exec Tooling.DotNetRuntime.Desktop Build.BuildFailure project ["restore"; path; "--quiet"]
Tooling.Dnu.Exec Tooling.DotNetRuntime.Desktop Build.BuildFailure project ["build"; path; "--configuration Release --quiet"]
|> Seq.iter(fun p ->
let path = (Paths.Quote (Paths.ProjectJson p))
Tooling.DotNet.Exec Tooling.DotNetRuntime.Core Build.BuildFailure p ["restore"; path; "--verbosity Warning"]
Tooling.DotNet.Exec Tooling.DotNetRuntime.Core Build.BuildFailure p ["build"; path; "--configuration Release"]
)

static member BuildFailure errors =
raise (BuildException("The project build failed.", errors |> List.ofSeq))

static member Compile() =
let projects = !! Paths.Source("*/project.json")
|> Seq.map DirectoryName

static let compileDesktop projects =
projects
|> Seq.iter(fun project ->

//eventhough this says desktop it still builds all the tfm's it just hints wich installed dnx version to use
let path = (Paths.Quote project)
Tooling.Dnu.Exec Tooling.DotNetRuntime.Desktop Build.BuildFailure project ["restore"; path; "--quiet"]
Tooling.Dnu.Exec Tooling.DotNetRuntime.Desktop Build.BuildFailure project ["build"; path; "--configuration Release --quiet"]
|> Seq.iter(fun project ->
Tooling.MsBuild.Exec (Paths.Net45BinFolder project) "Rebuild" Tooling.DotNetFramework.Net45.Identifier [Paths.CsProj(project)]
Tooling.MsBuild.Exec (Paths.Net46BinFolder project) "Rebuild" Tooling.DotNetFramework.Net46.Identifier [Paths.CsProj(project)]
)

static let copyToOutput projects =
projects
|> Seq.iter(fun project ->
let projectName = (project |> directoryInfo).Name
|> Seq.iter(fun p ->
let projectName = (p |> directoryInfo).Name
let outputFolder = Paths.Output(projectName)
let binFolder = Paths.BinFolder(projectName)
if not isMono then
Expand All @@ -59,10 +48,23 @@ type Build() =
| "Elasticsearch.Net" ->
gitLink (Paths.Net45BinFolder projectName) projectName
gitLink (Paths.Net46BinFolder projectName) projectName
gitLink (Paths.DotNet51BinFolder projectName) projectName
gitLink (Paths.NetStandard13BinFolder projectName) projectName
| _ -> ()
CopyDir outputFolder binFolder allFiles
)

static member BuildFailure errors =
raise (BuildException("The project build failed.", errors |> List.ofSeq))

static member QuickCompile() =
compileDesktop allProjects
compileCore allProjects

static member Compile() =
compileDesktop allProjects
compileCore allProjects
copyToOutput allProjects

static member Clean() =
CleanDir Paths.BuildOutput
allProjects |> Seq.iter(fun p -> CleanDir(Paths.BinFolder p))
4 changes: 4 additions & 0 deletions build/scripts/Documentation.fsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#I @"../../packages/build/FAKE/tools"
#r @"FakeLib.dll"

#load @"Paths.fsx"

open System

open Fake

open Paths

module Documentation =
Expand Down
6 changes: 3 additions & 3 deletions build/scripts/InheritDoc.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#r @"FakeLib.dll"
#r "System.Xml.Linq.dll"

open System.Xml
open System.Xml.XPath
open System.Linq
open System.Xml.Linq
open System.Text.RegularExpressions
open System.Xml
open System.Xml.Linq
open System.Xml.XPath

let PatchXmlDoc = fun (file: string) ->
let xml = XDocument.Load file
Expand Down
Loading