|
| 1 | +<Project Sdk="Microsoft.NET.Sdk"> |
| 2 | + |
| 3 | + <PropertyGroup> |
| 4 | + <NoBuild>true</NoBuild> |
| 5 | + <!-- prevents error `The 'NoBuild' property was set to true but the 'Build' target was invoked` --> |
| 6 | + <!-- will be removed after https://github.com/NuGet/Home/issues/7801 in netcore > 5 ? --> |
| 7 | + <GeneratePackageOnBuild>true</GeneratePackageOnBuild> |
| 8 | + <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory> |
| 9 | + <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory> |
| 10 | + <CopyDocumentationFileToOutputDirectory>false</CopyDocumentationFileToOutputDirectory> |
| 11 | + <TargetFramework>netstandard2.0</TargetFramework> |
| 12 | + <IncludeBuildOutput>false</IncludeBuildOutput> |
| 13 | + <PackageId>tmp</PackageId> |
| 14 | + <PackageOutputPath>$(BaseIntermediateOutputPath)</PackageOutputPath> |
| 15 | + <RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild> |
| 16 | + <RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis> |
| 17 | + <RunAnalyzers>false</RunAnalyzers> |
| 18 | + <NoPackageAnalysis>true</NoPackageAnalysis> |
| 19 | + <WarningLevel>0</WarningLevel> |
| 20 | + </PropertyGroup> |
| 21 | + <!-- Force Release Configuration build and check env variables / User.Directory.Build.props --> |
| 22 | + <Target Name="_CheckConfiguration" BeforeTargets="CoreBuild"> |
| 23 | + <Error Condition="'$(Configuration)' != 'Release'" Text="You should build this project only in 'Release' configuration. Use `dotnet build -c Release`" /> |
| 24 | + <Error Condition="'$(DoNugetFeedApiKey)' == ''" Text="You should set 'DoNugetFeedApiKey' property in User.Directory.Build.props or in env variable" /> |
| 25 | + <Error Condition="'$(DoNugetFeedUrl)' == ''" Text="You should set 'DoNugetFeedUrl' property in User.Directory.Build.props or in env variable" /> |
| 26 | + </Target> |
| 27 | + |
| 28 | + <ItemGroup Label="Build order"> |
| 29 | + <ProjectReference Include="$(SolutionDir)\Extensions\**\*.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" /> |
| 30 | + <ProjectReference Include="$(SolutionDir)\Orm\**\*.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" /> |
| 31 | + <ProjectReference Include="$(SolutionDir)\Weaver\**\*.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" /> |
| 32 | + </ItemGroup> |
| 33 | + <!-- You can add to this list in User.Directory.Build.props --> |
| 34 | + <ItemGroup> |
| 35 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.$(Version).nupkg" /> |
| 36 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.BulkOperations.$(Version).nupkg" /> |
| 37 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Firebird.$(Version).nupkg" /> |
| 38 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Localization.$(Version).nupkg" /> |
| 39 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Logging.log4net.$(Version).nupkg" /> |
| 40 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Logging.NLog.$(Version).nupkg" /> |
| 41 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.MySql.$(Version).nupkg" /> |
| 42 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Oracle.$(Version).nupkg" /> |
| 43 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.PostgreSql.$(Version).nupkg" /> |
| 44 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Reprocessing.$(Version).nupkg" /> |
| 45 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Security.$(Version).nupkg" /> |
| 46 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Sqlite.$(Version).nupkg" /> |
| 47 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.SqlServer.$(Version).nupkg" /> |
| 48 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Tracking.$(Version).nupkg" /> |
| 49 | + <NugetPublishInput Include="$(SolutionDir)_Build\Release\packages\Xtensive.Orm.Web.$(Version).nupkg" /> |
| 50 | + </ItemGroup> |
| 51 | + |
| 52 | + <!-- If package-lock.json has changed, perform an NPM install --> |
| 53 | + <Target Name="PublishToNuget" AfterTargets="Pack" DependsOnTargets="Pack"> |
| 54 | + <Message Importance="high" Text="Publish nupkg %(NugetPublishInput.Identity) to server" /> |
| 55 | + <Exec Command="dotnet nuget push %(NugetPublishInput.Identity) --force-english-output --timeout 60 --api-key $(DoNugetFeedApiKey) --source $(DoNugetFeedUrl)" WorkingDirectory="$(SolutionDir)_Build\Release\packages" /> |
| 56 | + </Target> |
| 57 | +</Project> |
0 commit comments