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
12 changes: 6 additions & 6 deletions build/Elasticsearch.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
</dependencies>
</metadata>
<files>
<file src="..\src\Elasticsearch.Net\bin\Release\net45\Elasticsearch.Net.dll" target="lib\net45"/>
<file src="..\src\Elasticsearch.Net\bin\Release\net45\Elasticsearch.Net.XML" target="lib\net45"/>
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.dll" target="lib\net45"/>
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.XML" target="lib\net45"/>

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

<file src="..\src\Elasticsearch.Net\bin\Release\netstandard1.3\Elasticsearch.Net.dll" target="lib\netstandard1.3"/>
<file src="..\src\Elasticsearch.Net\bin\Release\netstandard1.3\Elasticsearch.Net.xml" target="lib\netstandard1.3"/>
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.dll" target="lib\netstandard1.3"/>
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.xml" target="lib\netstandard1.3"/>
</files>
</package>
18 changes: 9 additions & 9 deletions build/NEST.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,30 @@
<dependencies>
<group targetFramework=".NETFramework4.5">
<dependency id="Elasticsearch.Net" version="[$version$, $nextMajorVersion$)" />
<dependency id="Newtonsoft.Json" version="[10,11)" />
<dependency id="Newtonsoft.Json" version="[$jsonDotNetCurrentVersion$, $jsonDotNetNextVersion$)" />
</group>
<group targetFramework=".NETFramework4.6">
<dependency id="Elasticsearch.Net" version="[$version$, $nextMajorVersion$)" />
<dependency id="Newtonsoft.Json" version="[10,11)" />
<dependency id="Newtonsoft.Json" version="[$jsonDotNetCurrentVersion$, $jsonDotNetNextVersion$)" />
</group>
<group targetFramework=".NETStandard1.3">
<dependency id="NETStandard.Library" version="[1.6.0, )" />
<dependency id="System.Collections.Specialized" version="[4.3.0, )" />
<dependency id="System.Reflection.TypeExtensions" version="[4.3.0, )" />
<dependency id="System.Linq.Queryable" version="[4.0.1, )" />
<dependency id="Elasticsearch.Net" version="[$version$, $nextMajorVersion$)" />
<dependency id="Newtonsoft.Json" version="[10,11)" />
<dependency id="Newtonsoft.Json" version="[$jsonDotNetCurrentVersion$, $jsonDotNetNextVersion$)" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ 💯

</group>
</dependencies>
</metadata>
<files>
<file src="..\src\Nest\bin\Release\net45\Nest.dll" target="lib\net45"/>
<file src="..\src\Nest\bin\Release\net45\Nest.XML" target="lib\net45"/>
<file src="output\Nest\net45\Nest.dll" target="lib\net45"/>
<file src="output\Nest\net45\Nest.XML" target="lib\net45"/>

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

<file src="..\src\Nest\bin\Release\netstandard1.3\Nest.dll" target="lib\netstandard1.3"/>
<file src="..\src\Nest\bin\Release\netstandard1.3\Nest.xml" target="lib\netstandard1.3"/>
<file src="output\Nest\netstandard1.3\Nest.dll" target="lib\netstandard1.3"/>
<file src="output\Nest\netstandard1.3\Nest.xml" target="lib\netstandard1.3"/>
</files>
</package>
4 changes: 3 additions & 1 deletion build/scripts/Building.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#load @"Versioning.fsx"

open System
open System.IO
open Fake
open FSharp.Data

Expand Down Expand Up @@ -41,6 +42,7 @@ module Build =
"CurrentAssemblyFileVersion", (Versioning.CurrentAssemblyFileVersion.ToString());
"DoSourceLink", sourceLink;
"DotNetCoreOnly", if buildingOnTravis then "1" else "";
"OutputPathBaseDir", Path.GetFullPath Paths.BuildOutput;
]
|> List.map (fun (p,v) -> sprintf "%s=%s" p v)
|> String.concat ";"
Expand Down Expand Up @@ -77,4 +79,4 @@ module Build =
DotNetCli.RunCommand (fun p -> { p with TimeOut = TimeSpan.FromMinutes(3.) }) "clean src/Elasticsearch.sln -c Release" |> ignore
DotNetProject.All |> Seq.iter(fun p -> CleanDir(Paths.BinFolder p.Name))
| (_, _) ->
tracefn "Skiping clean target only run when calling 'release', 'canary', 'clean' as targets directly"
tracefn "Skipping clean target only run when calling 'release', 'canary', 'clean' as targets directly"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/me 😭

11 changes: 5 additions & 6 deletions build/scripts/Documentation.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ open Projects
module Documentation =

let Generate() =
let prefix = "CodeGeneration"
let generatorFolder = Paths.IncrementalOutputFolderWithPrefix prefix (PrivateProject PrivateProject.DocGenerator) DotNetFramework.Net46
let generator = generatorFolder @@ "DocGenerator.exe"
let docGenerator = PrivateProject(DocGenerator)
let path = Paths.ProjectOutputFolder docGenerator DotNetFramework.Net46
let generator = sprintf "%s/%s.exe" path docGenerator.Name
ExecProcess (fun p ->
p.WorkingDirectory <- "src/CodeGeneration/DocGenerator"
p.WorkingDirectory <- Paths.Source("CodeGeneration") @@ docGenerator.Name
p.FileName <- generator
)
(TimeSpan.FromMinutes (1.0)) |> ignore
) (TimeSpan.FromMinutes 1.) |> ignore

// TODO: hook documentation validation into the process
let Validate() =
Expand Down
13 changes: 2 additions & 11 deletions build/scripts/Paths.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ module Paths =
let BuildOutput = sprintf "%s/output" BuildFolder

let ProjectOutputFolder (project:DotNetProject) (framework:DotNetFramework) =
sprintf "%s/%s/%s" BuildOutput framework.Identifier.MSBuild project.Name

let IncrementalOutputFolder (project:DotNetProject) (framework:DotNetFramework) =
sprintf "src/%s/bin/Release/%s" project.Name framework.Identifier.Nuget

let IncrementalOutputFolderWithPrefix prefix (project:DotNetProject) (framework:DotNetFramework) =
sprintf "src/%s/%s/bin/Release/%s" prefix project.Name framework.Identifier.Nuget

sprintf "%s/%s/%s" BuildOutput project.Name framework.Identifier.Nuget

let Tool tool = sprintf "packages/build/%s" tool
let CheckedInToolsFolder = "build/Tools"
let KeysFolder = sprintf "%s/keys" BuildFolder
Expand All @@ -44,6 +38,3 @@ module Paths =
let BinFolder(folder) =
let f = replace @"\" "/" folder
sprintf "%s/%s/bin/Release" SourceFolder f

let ProjectJson(projectName) =
Source(sprintf "%s/project.json" projectName)
7 changes: 7 additions & 0 deletions build/scripts/Releasing.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ module Release =

let year = sprintf "%i" DateTime.UtcNow.Year

let jsonDotNetVersion = 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would have given this PR ⭐️⭐️⭐️⭐️⭐️ had this been read from our csproj files.

That said, submitting a PR that brings us back to paket soon so might have been waisted effort.


let jsonDotNetCurrentVersion = sprintf "%i" jsonDotNetVersion
let jsonDotNetNextVersion = sprintf "%i" (jsonDotNetVersion + 1)

let properties =
let addKeyValue (e:Expr<string>) (builder:StringBuilder) =
// the binding for this tuple looks like key/value should
Expand All @@ -46,6 +51,8 @@ module Release =
new StringBuilder()
|> addKeyValue <@nextMajorVersion@>
|> addKeyValue <@year@>
|> addKeyValue <@jsonDotNetCurrentVersion@>
|> addKeyValue <@jsonDotNetNextVersion@>
|> toText

Tooling.Nuget.Exec [ "pack"; nuspec;
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/Signing.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module StrongName =
for p in DotNetProject.AllPublishable do
for f in DotNetFramework.All do
let name = p.Name
let folder = Paths.IncrementalOutputFolder p f
let folder = Paths.ProjectOutputFolder p f
let dll = sprintf "%s/%s.dll" folder name
match fileExists dll with
| true -> validate dll name
Expand Down
7 changes: 4 additions & 3 deletions build/scripts/Versioning.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ module Versioning =
let bv = getBuildParam "version"
let buildVersion = if (isNullOrEmpty bv) then None else Some(parse(bv))
match (getBuildParam "target", buildVersion) with
| ("release", None) -> failwithf "can not run release because no explicit version number was passed on the command line"
| ("release", None) -> failwithf "cannot run release because no explicit version number was passed on the command line"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/me 😭

| ("release", Some v) ->
if (currentVersion >= v) then failwithf "tried to create release %s but current version is already at %s" (v.ToString()) (currentVersion.ToString())
// Warn if version is same as current version
if (currentVersion >= v) then traceImportant (sprintf "creating release %s when current version is already at %s" (v.ToString()) (currentVersion.ToString()))
writeVersionIntoGlobalJson v
v
| ("canary", Some v) -> failwithf "can not run canary release, expected no version number to specified but received %s" (v.ToString())
| ("canary", Some v) -> failwithf "cannot run canary release, expected no version number to specified but received %s" (v.ToString())
| ("canary", None) ->
let timestampedVersion = (sprintf "ci%s" (DateTime.UtcNow.ToString("MMddHHmmss")))
tracefn "Canary suffix %s " timestampedVersion
Expand Down
2 changes: 1 addition & 1 deletion src/CodeGeneration/ApiGenerator/ApiGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<VersionSuffix>alpha</VersionSuffix>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Nest\Nest.csproj" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
<PackageReference Include="RazorMachine" Version="2.6.1" />
<!-- TODO the following packages prevent us to jump to netcoreapp1.0 -->
Expand All @@ -17,4 +16,5 @@
<Folder Include="RestSpecification\XPack\Info" />
<Folder Include="RestSpecification\XPack\MachineLearning" />
</ItemGroup>
<Import Project="..\..\outputpath.props" />
</Project>
3 changes: 2 additions & 1 deletion src/CodeGeneration/DocGenerator/DocGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
</ItemGroup>
</Project>
<Import Project="..\..\outputpath.props" />
</Project>
3 changes: 2 additions & 1 deletion src/Elasticsearch.Net/Elasticsearch.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
</ItemGroup>
</Project>
<Import Project="..\outputpath.props" />
</Project>
2 changes: 1 addition & 1 deletion src/Nest/Nest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
<PackageReference Include="System.Linq.Queryable" Version="4.0.1" />
</ItemGroup>
<!--<Import Project="..\..\.paket\Paket.Restore.targets" />-->
<Import Project="..\outputpath.props" />
</Project>
3 changes: 2 additions & 1 deletion src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@
<ItemGroup>
<EmbeddedResource Include="Document\Single\Attachment\Attachment_Test_Document.pdf" />
</ItemGroup>
</Project>
<Import Project="..\outputpath.props" />
</Project>
2 changes: 1 addition & 1 deletion src/outputpath.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath Condition="'$(OutputPathBaseDir)' != ''">$(OutputPathBaseDir)\$(TargetFrameworkVersion)\$(MSBuildProjectName)\</OutputPath>
<OutputPath Condition="'$(OutputPathBaseDir)' != ''">$(OutputPathBaseDir)\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
</Project>