Skip to content

Commit d3e2583

Browse files
committed
updated build to create signed nuget package variants for NEST fixes #338
1 parent 369477e commit d3e2583

File tree

10 files changed

+95
-56
lines changed

10 files changed

+95
-56
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,7 @@ _NCrunch*/
3434
[Tt]est[Rr]esult*
3535
build/tmp
3636
build/tmp/*
37+
build/_out/*
38+
build/keys/private.snk
3739
!build/NuGet.exe
3840
/dep/Newtonsoft.Json.4.0.2
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
<?xml version="1.0"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
33
<metadata>
4-
<id>Nest.Dsl.Factory</id>
4+
<id>NEST.Signed</id>
55
<version>0.9.0.0</version>
6-
<title>Nest.Dsl.Factory - A port of the java DSL</title>
6+
<title>NEST.Signed - Elasticsearch Client</title>
77
<authors>Martijn Laarman and contributors</authors>
88
<owners>Martijn Laarman</owners>
99
<iconUrl>http://nest.azurewebsites.net/images/nuget-icon.png</iconUrl>
1010
<licenseUrl>http://mpdreamz.mit-license.org/</licenseUrl>
1111
<projectUrl>https://github.com/Mpdreamz/NEST</projectUrl>
12-
<summary>Nest already has a complete lambda DSL, this package introduces a second DSL that's a port of the Java DSL</summary>
12+
<summary>Elasticsearch client, strongly typed interface to Elasticsearch but also comes with great low level support. This is the signed assembly version.</summary>
1313
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14-
<description>Nest already has a complete lambda DSL, this package introduces a second DSL that's a port of the Java DSL</description>
14+
<description>Elasticsearch client, strongly typed interface to Elasticsearch but also comes with great low level support.</description>
1515
<dependencies>
16-
<dependency id="NEST" />
1716
<dependency id="Newtonsoft.Json" />
1817
</dependencies>
1918
<tags>elasticsearch elastic search lucene nest</tags>
2019
</metadata>
2120
<files>
22-
<file src="lib\**\Nest.Dsl.Factory.dll" target="lib"/>
23-
<file src="lib\**\Nest.Dsl.Factory.pdb" target="lib"/>
24-
<file src="lib\**\Nest.Dsl.Factory.XML" target="lib"/>
21+
<file src="lib\**\Nest.Signed.dll" target="lib"/>
22+
<file src="lib\**\Nest.Signed.pdb" target="lib"/>
23+
<file src="lib\**\Nest.Signed.XML" target="lib"/>
2524
</files>
2625
</package>

build/NEST.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<iconUrl>http://nest.azurewebsites.net/images/nuget-icon.png</iconUrl>
1010
<licenseUrl>http://mpdreamz.mit-license.org/</licenseUrl>
1111
<projectUrl>https://github.com/Mpdreamz/NEST</projectUrl>
12-
<summary>Elasticsearch client, focuses on a strongly typed interface to elasticsearch but works well with dynamic use cases too.</summary>
12+
<summary>Elasticsearch client, strongly typed interface to Elasticsearch but also comes with great low level support.</summary>
1313
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14-
<description>Elasticsearch client, focuses on a strongly typed interface to elasticsearch but works well with dynamic use cases too.</description>
14+
<description>Elasticsearch client, strongly typed interface to Elasticsearch but also comes with great low level support.</description>
1515
<dependencies>
1616
<dependency id="Newtonsoft.Json" />
1717
</dependencies>

build/NESTBuild.proj

Lines changed: 53 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,18 @@
3131
AssemblyVersion="$(Version)"
3232
AssemblyFileVersion="$(Version)"/>
3333
<AssemblyInfo CodeLanguage="CS"
34-
OutputFile="$(SrcDir)\Nest.Connection.Thrift\Properties\AssemblyInfo.cs"
35-
AssemblyTitle="Nest.Connection.Thrift"
36-
AssemblyDescription="Thrift connection support for NEST Elasticsearch client"
37-
AssemblyCompany=""
38-
AssemblyProduct="Nest.Connection.Thrift"
39-
AssemblyCopyright="Martijn Laarman MIT LICENSED"
40-
ComVisible="false"
41-
CLSCompliant="true"
42-
Guid="4d165338-2060-4641-8be6-b7aacbdee52d"
43-
34+
OutputFile="$(SrcDir)\Nest.Connection.Thrift\Properties\AssemblyInfo.cs"
35+
AssemblyTitle="Nest.Connection.Thrift"
36+
AssemblyDescription="Thrift connection support for NEST Elasticsearch client"
37+
AssemblyCompany=""
38+
AssemblyProduct="Nest.Connection.Thrift"
39+
AssemblyCopyright="Martijn Laarman MIT LICENSED"
40+
ComVisible="false"
41+
CLSCompliant="true"
42+
Guid="4d165338-2060-4641-8be6-b7aacbdee52d"
43+
4444
AssemblyVersion="$(Version)"
4545
AssemblyFileVersion="$(Version)"/>
46-
<AssemblyInfo CodeLanguage="CS"
47-
OutputFile="$(SrcDir)\Nest.Dsl.Factory\Properties\AssemblyInfo.cs"
48-
AssemblyTitle="Nest.Dsl.Factory"
49-
AssemblyDescription="Nest already has a complete lambda DSL, this package introduces a second DSL that's a port of the Java DSL"
50-
AssemblyCompany=""
51-
AssemblyProduct="Nest.Dsl.Factory"
52-
AssemblyCopyright="Martijn Laarman MIT LICENSED"
53-
ComVisible="false"
54-
CLSCompliant="true"
55-
Guid="665cc582-c91f-4f6c-924a-614289fa9449"
56-
57-
AssemblyVersion="$(Version)"
58-
AssemblyFileVersion="$(Version)"/>
5946

6047
<MSBuild Projects="$(SolutionFile)" Properties="Configuration=$(Configuration)" />
6148
</Target>
@@ -64,24 +51,36 @@
6451
<ItemGroup>
6552
<MainBinaries Include="$(SrcDir)\**\Nest\bin\$(Configuration)\**\*.*" />
6653
<ThriftBinaries Include="$(SrcDir)\**\Nest.Connection.Thrift\bin\$(Configuration)\**\*.*" />
67-
<FactoryDslBinaries Include="$(SrcDir)\**\Nest.Dsl.Factory\bin\$(Configuration)\**\*.*" />
6854
</ItemGroup>
6955

7056
<!-- First copy the nuspec template files to the build dir -->
7157
<Copy SourceFiles="..\build\NEST.nuspec" DestinationFolder="$(BuildDir)" />
58+
<Copy SourceFiles="..\build\NEST.Signed.nuspec" DestinationFolder="$(BuildDir)" />
7259
<Copy SourceFiles="..\build\Nest.Connection.Thrift.nuspec" DestinationFolder="$(BuildDir)" />
73-
<Copy SourceFiles="..\build\Nest.Dsl.Factory.nuspec" DestinationFolder="$(BuildDir)" />
74-
60+
<Copy SourceFiles="..\build\Nest.Connection.Thrift.Signed.nuspec" DestinationFolder="$(BuildDir)" />
7561
<!-- Copy the source files to the package dir -->
7662
<Copy SourceFiles="@(MainBinaries)" DestinationFolder="$(BuildDir)\lib\NET4\" />
7763
<Copy SourceFiles="@(ThriftBinaries)" DestinationFolder="$(BuildDir)\lib\NET4\" />
78-
<Copy SourceFiles="@(FactoryDslBinaries)" DestinationFolder="$(BuildDir)\lib\NET4\" />
7964

8065
<!-- Get the version number of the main FV assembly to insert into the nuspec files -->
8166
<GetAssemblyIdentity AssemblyFiles="$(BuildDir)\lib\NET4\Nest.dll">
8267
<Output TaskParameter="Assemblies" ItemName="AsmInfo" />
8368
</GetAssemblyIdentity>
8469

70+
<!-- ilmerge.exe Nest.dll /keyfile:PublicKey.snk /out:out\Nest.dll -->
71+
72+
<!-- Create signed copies -->
73+
74+
<!--<Exec WorkingDirectory="$(BuildDir)"
75+
Command="$(MSBuildProjectDirectory)\tools\nuget.exe pack $(BuildDir)\NEST.nuspec" />-->
76+
77+
<Exec WorkingDirectory="$(BuildDir)"
78+
Command='$(MSBuildProjectDirectory)\tools\ilmerge.exe $(BuildDir)\lib\NET4\Nest.dll /keyfile:$(MSBuildProjectDirectory)\keys\public.snk /out:$(BuildDir)\lib\NET4\Nest.Signed.dll /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /delaysign' />
79+
80+
81+
<Exec WorkingDirectory="$(BuildDir)"
82+
Command='$(MSBuildProjectDirectory)\tools\ilmerge.exe $(BuildDir)\lib\NET4\Nest.Connection.Thrift.dll /keyfile:$(MSBuildProjectDirectory)\keys\public.snk /out:$(BuildDir)\lib\NET4\Nest.Connection.Thrift.Signed.dll /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /delaysign' />
83+
8584
<!-- insert the version number into the nuspec files -->
8685
<XmlUpdate
8786
Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
@@ -91,33 +90,45 @@
9190
Value="%(AsmInfo.Version)" />
9291

9392
<Exec WorkingDirectory="$(BuildDir)"
94-
Command="$(MSBuildProjectDirectory)\nuget.exe pack $(BuildDir)\NEST.nuspec" />
95-
96-
<XmlUpdate
97-
Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
98-
Prefix="n"
99-
XmlFileName="$(BuildDir)\Nest.Connection.Thrift.nuspec"
100-
XPath="/n:package/n:metadata/n:version"
101-
Value="%(AsmInfo.Version)" />
102-
103-
<Exec WorkingDirectory="$(BuildDir)"
104-
Command="$(MSBuildProjectDirectory)\nuget.exe pack $(BuildDir)\Nest.Connection.Thrift.nuspec" />
93+
Command="$(MSBuildProjectDirectory)\tools\nuget.exe pack $(BuildDir)\NEST.nuspec" />
10594

10695
<XmlUpdate
10796
Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
10897
Prefix="n"
109-
XmlFileName="$(BuildDir)\Nest.Dsl.Factory.nuspec"
98+
XmlFileName="$(BuildDir)\NEST.Signed.nuspec"
11099
XPath="/n:package/n:metadata/n:version"
111100
Value="%(AsmInfo.Version)" />
112101

113102
<Exec WorkingDirectory="$(BuildDir)"
114-
Command="$(MSBuildProjectDirectory)\nuget.exe pack $(BuildDir)\Nest.Dsl.Factory.nuspec" />
103+
Command="$(MSBuildProjectDirectory)\tools\nuget.exe pack $(BuildDir)\NEST.Signed.nuspec" />
104+
105+
<XmlUpdate
106+
Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
107+
Prefix="n"
108+
XmlFileName="$(BuildDir)\Nest.Connection.Thrift.nuspec"
109+
XPath="/n:package/n:metadata/n:version"
110+
Value="%(AsmInfo.Version)" />
111+
112+
<Exec WorkingDirectory="$(BuildDir)"
113+
Command="$(MSBuildProjectDirectory)\tools\nuget.exe pack $(BuildDir)\Nest.Connection.Thrift.nuspec" />
114+
115+
<XmlUpdate
116+
Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
117+
Prefix="n"
118+
XmlFileName="$(BuildDir)\Nest.Connection.Thrift.Signed.nuspec"
119+
XPath="/n:package/n:metadata/n:version"
120+
Value="%(AsmInfo.Version)" />
121+
122+
<Exec WorkingDirectory="$(BuildDir)"
123+
Command="$(MSBuildProjectDirectory)\tools\nuget.exe pack $(BuildDir)\Nest.Connection.Thrift.Signed.nuspec" />
124+
125+
115126

116127
<ItemGroup>
117128
<Packages Include="$(BuildDir)\*.nupkg" />
118129
</ItemGroup>
119-
<Copy SourceFiles="@(Packages)" DestinationFolder="$(BuildDir)\..\" />
120-
130+
<Copy SourceFiles="@(Packages)" DestinationFolder="$(BuildDir)\..\_out" />
131+
121132
<RemoveDir Directories="$(BuildDir)" />
122133
</Target>
123134
</Project>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>Nest.Connection.Thrift.Signed</id>
5+
<version>0.9.0.0</version>
6+
<title>Nest.Connection.Thrift.Signed - Thrift support for NEST.</title>
7+
<authors>Martijn Laarman and contributors</authors>
8+
<owners>Martijn Laarman</owners>
9+
<iconUrl>http://nest.azurewebsites.net/images/nuget-icon.png</iconUrl>
10+
<licenseUrl>http://mpdreamz.mit-license.org/</licenseUrl>
11+
<projectUrl>https://github.com/Mpdreamz/NEST</projectUrl>
12+
<summary>Thrift connection support for NEST Elasticsearch client. This is the signed assembly version.</summary>
13+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14+
<description>Thrift connection support for NEST Elasticsearch client</description>
15+
<dependencies>
16+
<dependency id="NEST.Signed" />
17+
<dependency id="Newtonsoft.Json" />
18+
<dependency id="NetReflector" />
19+
</dependencies>
20+
<tags>elasticsearch elastic search lucene nest</tags>
21+
</metadata>
22+
<files>
23+
<file src="lib\**\Nest.Connection.Thrift.Signed.dll" target="lib"/>
24+
<file src="lib\**\Nest.Connection.Thrift.Signed.pdb" target="lib"/>
25+
<file src="lib\**\Nest.Connection.Thrift.Signed.XML" target="lib"/>
26+
</files>
27+
</package>

build/NuGet.exe

-405 KB
Binary file not shown.

build/keys/public.snk

160 Bytes
Binary file not shown.

build/tools/mscorsn.dll

25.4 KB
Binary file not shown.

src/Nest.Connection.Thrift/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
[assembly: System.Runtime.InteropServices.ComVisible(false)]
1616
[assembly: System.CLSCompliant(true)]
1717
[assembly: System.Runtime.InteropServices.Guid("4d165338-2060-4641-8be6-b7aacbdee52d")]
18-
[assembly: System.Reflection.AssemblyVersion("0.11.5.0")]
19-
[assembly: System.Reflection.AssemblyFileVersion("0.11.5.0")]
18+
[assembly: System.Reflection.AssemblyVersion("0.11.6.0")]
19+
[assembly: System.Reflection.AssemblyFileVersion("0.11.6.0")]
2020

2121

src/Nest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
[assembly: System.Runtime.InteropServices.ComVisible(false)]
1616
[assembly: System.CLSCompliant(true)]
1717
[assembly: System.Runtime.InteropServices.Guid("07E5CFA3-CF5F-4D17-874C-8D5CC6FA3E73")]
18-
[assembly: System.Reflection.AssemblyVersion("0.11.5.0")]
19-
[assembly: System.Reflection.AssemblyFileVersion("0.11.5.0")]
18+
[assembly: System.Reflection.AssemblyVersion("0.11.6.0")]
19+
[assembly: System.Reflection.AssemblyFileVersion("0.11.6.0")]
2020

2121

0 commit comments

Comments
 (0)