Skip to content

Commit b68ecf7

Browse files
ngbrownhazzik
authored andcommitted
Use MsBuild/dotnet pack NuGet package
1 parent b95f88a commit b68ecf7

File tree

10 files changed

+69
-126
lines changed

10 files changed

+69
-126
lines changed

build-common/NHibernate.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@
1212
<Product>NHibernate</Product>
1313
<Company>NHibernate.info</Company>
1414
<Copyright>Licensed under LGPL.</Copyright>
15+
<Authors>NHibernate community, Hibernate community</Authors>
16+
<NeutralLanguage>en-US</NeutralLanguage>
17+
18+
<RepositoryUrl>https://github.com/nhibernate/nhibernate-core.git</RepositoryUrl>
19+
<RepositoryType>git</RepositoryType>
1520
</PropertyGroup>
1621
</Project>

build-common/common-project.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@
6262
</exec>
6363
</target>
6464

65-
<target name="common.compile-all" depends="common.nuget-restore">
65+
<target name="common.compile-all" depends="common.nuget-restore nuget.set-properties">
6666
<!--property name="msbuild.cmd" value="${cmd.sln} ${cmd.out} ${cmd.platform} ${cmd.debug} ${cmd.optimize} ${cmd.doc} /t:Rebuild /v:q /m" /-->
6767
<exec program="${path::combine(tools.dir, 'msbuild.cmd')}" verbose="true">
6868
<arg value="${root.dir}/src/NHibernate.sln" />
6969
<arg value="/p:OutputPath=&quot;${path::get-full-path(bin.dir)}&quot;" />
7070
<arg value="/p:Platform=&quot;Any CPU&quot;" />
7171
<arg value="/p:Configuration=&quot;Debug&quot;" if="${build.debug == 'true'}" />
7272
<arg value="/p:Configuration=&quot;Release&quot;" if="${build.release == 'true'}" />
73+
<arg value="/p:PackageOutputPath=&quot;${path::get-full-path(nuget.nupackages.dir)}&quot;" />
7374
<arg value="/t:Restore" />
7475
<arg value="/t:Rebuild" />
7576
<arg value="/v:q" />

build-common/common.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@
181181

182182
<target name="nuget.set-properties">
183183
<property name="nuget.nupackages.relative-dir" value="nuget_gallery" />
184-
<!-- The nuget.workingdir is the directory from where all *.nuspec files will work.
185-
This is to simplify the compilation of *.nuspec.template files (see section 'files')-->
186-
<property name="nuget.workingdir" value="${build.dir}/tmp_nugetdeploy" />
187184

188185
<property name="nuget.nupackages.dir" value="${build.dir}/${nuget.nupackages.relative-dir}" />
189186
<property name="nuget.nupackages.pushbatfile" value="${nuget.nupackages.dir}/NuGetPush.bat" />

default.build

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -243,33 +243,8 @@
243243
commandline="src\NHibernate\nhibernate-mapping.xsd /classes /fields /order /namespace:NHibernate.Cfg.MappingSchema /out:src\NHibernate\Cfg\MappingSchema\"/>
244244

245245
</target>
246-
247-
<fileset id="nugetfiles.all" basedir="src">
248-
<include name="NHibernate/NHibernate.build" />
249-
</fileset>
250-
251-
<target name="nuspec" depends="init nuget.set-properties" description="Create nuspec files">
252-
<nant target="nuspec">
253-
<buildfiles refid="nugetfiles.all" />
254-
</nant>
255-
</target>
256-
257-
<target name="nuget" depends="init binaries nuget.set-properties nuspec"
258-
description="Creates files for the release on nuget gallery.">
259-
260-
<nant target="nuget">
261-
<buildfiles refid="nugetfiles.all" />
262-
</nant>
263-
264-
<mkdir dir="${nuget.nupackages.dir}" />
265-
<move todir="${nuget.nupackages.dir}">
266-
<fileset basedir="${nuget.workingdir}">
267-
<include name="*.nupkg" />
268-
</fileset>
269-
</move>
270-
</target>
271246

272-
<target name="nugetpushbat" depends="init binaries common.download-nuget nuget.set-properties nuspec nuget"
247+
<target name="nugetpushbat" depends="init binaries common.download-nuget nuget.set-properties"
273248
description="Creates files for the release on nuget gallery.">
274249

275250
<copy file="${tools.dir}/NuGet.exe" todir="${nuget.nupackages.dir}"/>
@@ -287,7 +262,7 @@
287262
</foreach>
288263
</target>
289264

290-
<target name="nugetpush" depends="init binaries common.download-nuget nuget.set-properties nuspec nuget"
265+
<target name="nugetpush" depends="init binaries common.download-nuget nuget.set-properties"
291266
description="Push packages on nuget gallery.">
292267
<!-- In order to use this task you have to be sure you have executed 'nuget SetApiKey' -->
293268
<foreach item="File" property="filename">

src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
<PackageReference Include="Remotion.Linq" Version="2.1.2" />
3232
<PackageReference Include="Remotion.Linq.EagerFetching" Version="2.1.0" />
3333
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.7.6" />
34-
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.3.0" />
34+
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.4.0" />
3535
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
36-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
36+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
3737
<PackageReference Include="Microsoft.VisualBasic" Version="10.2.0" />
3838
</ItemGroup>
3939

src/NHibernate.Test/NHibernate.Test.csproj

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="../../build-common/NHibernate.props" />
3+
34
<PropertyGroup>
45
<Description>The Unit Tests for NHibernate.</Description>
6+
57
<TargetFramework>net461</TargetFramework>
68
<NoWarn>$(NoWarn);3001;3002;3003;3005</NoWarn>
79
</PropertyGroup>
10+
811
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
912
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
1013
<TreatSpecificWarningsAsErrors />
1114
</PropertyGroup>
15+
1216
<ItemGroup>
1317
<None Remove="**\*.hbm.xml" />
1418
<None Remove="**\*.jpg" />
1519
<None Update="DbScripts\*.sql">
1620
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1721
</None>
1822
</ItemGroup>
23+
1924
<ItemGroup>
2025
<EmbeddedResource Include="**\*.hbm.xml" Exclude="bin\**\*.*" />
2126
<EmbeddedResource Include="**\*.jpg" />
@@ -27,11 +32,13 @@
2732
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
2833
</EmbeddedResource>
2934
</ItemGroup>
35+
3036
<ItemGroup>
3137
<Content Include="..\NHibernate.DomainModel\ABC.hbm.xml" Link="ABC.hbm.xml">
3238
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
3339
</Content>
3440
</ItemGroup>
41+
3542
<ItemGroup>
3643
<PackageReference Include="Antlr3.Runtime" Version="3.5.1" />
3744
<PackageReference Include="Iesi.Collections" Version="4.0.2" />
@@ -40,20 +47,24 @@
4047
<PackageReference Include="Remotion.Linq" Version="2.1.2" />
4148
<PackageReference Include="Remotion.Linq.EagerFetching" Version="2.1.0" />
4249
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.7.6" />
43-
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.3.0" />
50+
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.4.0" />
4451
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
45-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
52+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
4653
</ItemGroup>
54+
4755
<ItemGroup>
4856
<ProjectReference Include="..\NHibernate.DomainModel\NHibernate.DomainModel.csproj" />
4957
<ProjectReference Include="..\NHibernate\NHibernate.csproj" />
5058
</ItemGroup>
59+
5160
<ItemGroup>
5261
<Reference Include="System.Configuration" />
5362
<Reference Include="System.Data.OracleClient" />
5463
<Reference Include="System.Transactions" />
5564
</ItemGroup>
65+
5666
<ItemGroup>
5767
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
5868
</ItemGroup>
69+
5970
</Project>

src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="nunit" Version="3.7.1" />
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
2020
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
2121
</ItemGroup>
2222

src/NHibernate/NHibernate.build

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/NHibernate/NHibernate.csproj

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,80 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="../../build-common/NHibernate.props" />
3+
34
<PropertyGroup>
45
<Description>An object persistence library for relational databases.</Description>
56
<TargetFramework>net461</TargetFramework>
67
<NoWarn>$(NoWarn);3001;3002;3003;3005;1591</NoWarn>
78
<SignAssembly>True</SignAssembly>
9+
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
810
<AssemblyOriginatorKeyFile>..\NHibernate.snk</AssemblyOriginatorKeyFile>
911
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10-
</PropertyGroup>
11-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
12+
13+
<PackageDescription>NHibernate is a mature, open source object-relational mapper for the .NET framework. It is actively developed, fully featured and used in thousands of successful projects.</PackageDescription>
14+
<PackageProjectUrl>http://nhibernate.info</PackageProjectUrl>
15+
<PackageIconUrl>https://raw.githubusercontent.com/nhibernate/nhibernate-core/master/logo/NHibernate-NuGet.png</PackageIconUrl>
16+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
17+
<PackageLicenseUrl>https://raw.githubusercontent.com/nhibernate/nhibernate-core/master/LICENSE.txt</PackageLicenseUrl>
18+
<PackageTags>ORM; O/RM; DataBase; DAL; ObjectRelationalMapping; NHibernate; ADO.Net; Core</PackageTags>
19+
</PropertyGroup>
20+
21+
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
1222
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
1323
<TreatSpecificWarningsAsErrors />
24+
25+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
26+
<IncludeSymbols>true</IncludeSymbols>
27+
<IncludeSource>true</IncludeSource>
1428
</PropertyGroup>
29+
1530
<ItemGroup>
1631
<None Remove="**\*.g" />
1732
<None Remove="**\*.xsd" />
1833
</ItemGroup>
34+
1935
<ItemGroup>
2036
<Antlr3 Include="**\*.g" />
2137
</ItemGroup>
38+
2239
<ItemGroup>
2340
<EmbeddedResource Include="**\*.xsd" />
2441
</ItemGroup>
42+
2543
<ItemGroup>
2644
<None Include="..\NHibernate.snk" Link="NHibernate.snk" />
2745
</ItemGroup>
46+
2847
<ItemGroup>
2948
<PackageReference Include="Antlr3.CodeGenerator" Version="3.5.2-beta1">
3049
<PrivateAssets>All</PrivateAssets>
3150
</PackageReference>
32-
<PackageReference Include="Antlr3.Runtime" Version="3.5.1" />
33-
<PackageReference Include="iesi.collections" Version="4.0.2" />
34-
<PackageReference Include="Remotion.Linq" Version="2.1.2" />
35-
<PackageReference Include="Remotion.Linq.EagerFetching" Version="2.1.0" />
51+
<PackageReference Include="Antlr3.Runtime" Version="[3.5.1, 4.0)" />
52+
<PackageReference Include="Iesi.Collections" Version="[4.0.2, 5.0)" />
53+
<PackageReference Include="Remotion.Linq" Version="[2.1.2, 3.0)" />
54+
<PackageReference Include="Remotion.Linq.EagerFetching" Version="[2.1.0, 3.0)" />
3655
</ItemGroup>
56+
3757
<ItemGroup>
3858
<Reference Include="System.ServiceModel" />
3959
<Reference Include="System.Transactions" />
4060
<Reference Include="System.Configuration" />
4161
</ItemGroup>
62+
63+
<ItemGroup>
64+
<Content Include="*.xsd">
65+
<PackagePath>./</PackagePath>
66+
</Content>
67+
<Content Include="../NHibernate.Config.Templates/*">
68+
<PackagePath>./ConfigurationTemplates/</PackagePath>
69+
</Content>
70+
<Content Include="../../releasenotes.txt">
71+
<PackagePath>./NHibernate.releasenotes.txt</PackagePath>
72+
</Content>
73+
<Content Include="../../README.md">
74+
<PackagePath>./NHibernate.readme.md</PackagePath>
75+
</Content>
76+
<Content Include="../../LICENSE.txt">
77+
<PackagePath>./NHibernate.license.txt</PackagePath>
78+
</Content>
79+
</ItemGroup>
4280
</Project>

src/NHibernate/NHibernate.nuspec.template

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)