Skip to content

Commit

Permalink
Bump JSON version in preparation for release
Browse files Browse the repository at this point in the history
  • Loading branch information
russcam committed Mar 21, 2019
1 parent e4cfae0 commit 4f65857
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 24 deletions.
4 changes: 3 additions & 1 deletion build/Elasticsearch.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Elasticsearch.Net - Elasticsearch .NET low level client</title>
<authors>Elastic and contributors</authors>
<owners>Elastic</owners>
<licenseUrl>https://github.com/elastic/elasticsearch-net/blob/master/license.txt</licenseUrl>
<license type="file">license.txt</license>
<projectUrl>https://github.com/elastic/elasticsearch-net</projectUrl>
<iconUrl>https://raw.githubusercontent.com/elastic/elasticsearch-net/master/build/nuget-icon.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand All @@ -21,6 +21,8 @@
</dependencies>
</metadata>
<files>
<file src="..\license.txt" target="" />

<file src="output\Elasticsearch.Net\netstandard2.0\Elasticsearch.Net.dll" target="lib\netstandard2.0"/>
<file src="output\Elasticsearch.Net\netstandard2.0\Elasticsearch.Net.xml" target="lib\netstandard2.0"/>

Expand Down
4 changes: 3 additions & 1 deletion build/NEST.JsonNetSerializer.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>NEST.JsonNetSerializer - Elasticsearch .NET custom Json.NET serializer</title>
<authors>Elastic and contributors</authors>
<owners>Elastic</owners>
<licenseUrl>https://github.com/elastic/elasticsearch-net/blob/master/license.txt</licenseUrl>
<license type="file">license.txt</license>
<projectUrl>https://github.com/elastic/elasticsearch-net</projectUrl>
<iconUrl>https://raw.githubusercontent.com/elastic/elasticsearch-net/master/build/nuget-icon.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand All @@ -23,6 +23,8 @@
</dependencies>
</metadata>
<files>
<file src="..\license.txt" target="" />

<file src="output\Nest.JsonNetSerializer\netstandard2.0\Nest.JsonNetSerializer.dll" target="lib\netstandard2.0"/>
<file src="output\Nest.JsonNetSerializer\netstandard2.0\Nest.JsonNetSerializer.xml" target="lib\netstandard2.0"/>
</files>
Expand Down
4 changes: 3 additions & 1 deletion build/NEST.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<copyright>2014-$year$ Elasticsearch BV</copyright>

<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/elastic/elasticsearch-net/blob/master/license.txt</licenseUrl>
<license type="file">license.txt</license>
<projectUrl>https://github.com/elastic/elasticsearch-net</projectUrl>
<iconUrl>https://raw.githubusercontent.com/elastic/elasticsearch-net/master/build/nuget-icon.png</iconUrl>

Expand All @@ -29,6 +29,8 @@
</dependencies>
</metadata>
<files>
<file src="..\license.txt" target="" />

<file src="output\Nest\net461\Nest.dll" target="lib\net461"/>
<file src="output\Nest\net461\Nest.XML" target="lib\net461"/>

Expand Down
23 changes: 7 additions & 16 deletions build/scripts/Releasing.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,8 @@ module Release =
let semanticVersion = SemVerHelper.parse version
sprintf "%i" (semanticVersion.Major + 1)

let private addKeyValue (e:Expr<string>) (builder:StringBuilder) =
// the binding for this tuple looks like key/value should
// be round the other way (but it's correct as is)...
let (value,key) =
match e with
| PropertyGet (eo, pi, li) -> (pi.Name, (pi.GetValue(e) |> string))
| ValueWithName (obj,ty,nm) -> ((obj |> string), nm)
| _ -> failwith (sprintf "%A is not a let-bound value. %A" e (e.GetType()))

if (isNotNullOrEmpty value) then builder.AppendFormat("{0}=\"{1}\";", key, value)
else builder
let private addKeyValue (key:string) (value:string) (builder:StringBuilder) =
builder.AppendFormat("{0}=\"{1}\";", key, value)

let private currentVersion = sprintf "%O" <| Versioning.CurrentVersion
let private currentMajorVersion = sprintf "%i" <| Versioning.CurrentVersion.Major
Expand All @@ -64,9 +55,9 @@ module Release =

let private props() =
new StringBuilder()
|> addKeyValue <@currentMajorVersion@>
|> addKeyValue <@nextMajorVersion@>
|> addKeyValue <@year@>
|> addKeyValue "currentMajorVersion" currentMajorVersion
|> addKeyValue "nextMajorVersion" nextMajorVersion
|> addKeyValue "year" year

let pack file n properties =
Tooling.Nuget.Exec [ "pack"; file;
Expand Down Expand Up @@ -147,8 +138,8 @@ module Release =

let properties =
props()
|> addKeyValue <@jsonDotNetCurrentVersion@>
|> addKeyValue <@jsonDotNetNextVersion@>
|> addKeyValue "jsonDotNetCurrentVersion" jsonDotNetCurrentVersion
|> addKeyValue "jsonDotNetNextVersion" jsonDotNetNextVersion
|> toText
let nugetId = p.NugetId
let nuspec = (sprintf @"build/%s.nuspec" nugetId)
Expand Down
8 changes: 4 additions & 4 deletions build/scripts/Versioning.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module Versioning =
let CurrentAssemblyFileVersion = parse (sprintf "%s.%s.%s.0" (CurrentVersion.Major.ToString()) (CurrentVersion.Minor.ToString()) (CurrentVersion.Patch.ToString()))

let private sn = if isMono then "sn" else Paths.CheckedInTool("sn/sn.exe")
let private oficialToken = "96c599bbe3e70f5d"
let private officialToken = "96c599bbe3e70f5d"

let private validate dll name =
let out = (ExecProcessAndReturnMessages(fun p ->
Expand All @@ -72,7 +72,7 @@ module Versioning =
let valid = (out.ExitCode, out.Messages.FindIndex(fun s -> s.Contains("is valid")))
match valid with
| (0, i) when i >= 0 -> trace (sprintf "%s was signed correctly" name)
| (_, _) -> failwithf "{0} was not validly signed"
| (_, _) -> failwithf "%s was not validly signed" name

let out = (ExecProcessAndReturnMessages(fun p ->
p.FileName <- sn
Expand All @@ -84,9 +84,9 @@ module Versioning =

let valid = (out.ExitCode, token)
match valid with
| (0, t) when t = oficialToken ->
| (0, t) when t = officialToken ->
trace (sprintf "%s was signed with official key token %s" name t)
| (_, t) -> traceFAKE "%s was not signed with the official token: %s but %s" name oficialToken t
| (_, t) -> traceFAKE "%s was not signed with the official token: %s but %s" name officialToken t

let private validateDllStrongName dll name =
match fileExists dll with
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"sdk": {
"version": "2.1.300"
},
"version": "6.5.1"
"version": "6.6.0"
}

0 comments on commit 4f65857

Please sign in to comment.