diff options
Diffstat (limited to '.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19577.5/tools/BuildReleasePackages.targets')
-rwxr-xr-x | .packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19577.5/tools/BuildReleasePackages.targets | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19577.5/tools/BuildReleasePackages.targets b/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19577.5/tools/BuildReleasePackages.targets new file mode 100755 index 0000000000..a2a147a7b4 --- /dev/null +++ b/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19577.5/tools/BuildReleasePackages.targets @@ -0,0 +1,27 @@ +<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> +<Project> + <PropertyGroup> + <_NuGetRepackAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(NuGetPackageRoot)microsoft.dotnet.nugetrepack.tasks\$(MicrosoftDotnetNuGetRepackTasksVersion)\tools\net472\Microsoft.DotNet.NuGetRepack.Tasks.dll</_NuGetRepackAssembly> + <_NuGetRepackAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(NuGetPackageRoot)microsoft.dotnet.nugetrepack.tasks\$(MicrosoftDotnetNuGetRepackTasksVersion)\tools\netcoreapp2.1\Microsoft.DotNet.NuGetRepack.Tasks.dll</_NuGetRepackAssembly> + </PropertyGroup> + + <UsingTask TaskName="Microsoft.DotNet.Tools.UpdatePackageVersionTask" AssemblyFile="$(_NuGetRepackAssembly)" /> + + <Target Name="PackageReleasePackages" AfterTargets="Pack" Condition="'$(DotNetFinalVersionKind)' == ''"> + <Message Text="Building release versions of NuGet packages" Importance="high" /> + + <Error Text="PreReleaseVersionLabel must be non-empty when using NuGet Repack tool." Condition="'$(PreReleaseVersionLabel)' == ''" /> + + <ItemGroup> + <_BuiltPackages Include="$(ArtifactsShippingPackagesDir)*.nupkg" /> + </ItemGroup> + + <!-- Force references among packages to use exact versions (see https://github.com/NuGet/Home/issues/7213) --> + <Microsoft.DotNet.Tools.UpdatePackageVersionTask VersionKind="release" Packages="@(_BuiltPackages)" OutputDirectory="$(ArtifactsPackagesDir)Release" AllowPreReleaseDependencies="true" ExactVersions="true" /> + <Microsoft.DotNet.Tools.UpdatePackageVersionTask VersionKind="prerelease" Packages="@(_BuiltPackages)" OutputDirectory="$(ArtifactsPackagesDir)PreRelease" ExactVersions="true"/> + + <!-- Rewrite the version ranges of per-build pre-release packages (see https://github.com/NuGet/Home/issues/7213) --> + <Microsoft.DotNet.Tools.UpdatePackageVersionTask Packages="@(_BuiltPackages)" OutputDirectory="$(ArtifactsShippingPackagesDir)" ExactVersions="true"/> + </Target> + +</Project> |