Stabilize package versions (#14003)
* Mark all blobs as shipping - available (though not discoverable) in public dotnetcli feed * Stabilize package versions * Remove assumption that Microsoft.AspNetCore.AzureAppServices.SiteExtension packages have same version - Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.0 ships - Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.0.x?? do not ship * Make installer versions consistent - VS.Redist.Common.AspNetCore.SharedFramework and ...TargetingPack packages are non-shipping - everything else ships nit: remove extra whitespace in .nuspec files for the packages * Correct assumptions in framework unit tests - tests sometimes do not calculate version properties as product projects do - Microsoft.AspNetCore.App.Ref and ...Runtime packages may rev versions separately * Fix last 2 `SharedFxTests` failures * Correct Microsoft.AspNetCore.App* versions used in ProjectTemplates tests - `$(SharedFxVersion)` is not useful in test projects due to stable versioning * Add continue on error for test templates
This commit is contained in:
parent
adc28fdb42
commit
aee5e40803
|
|
@ -446,6 +446,7 @@ stages:
|
|||
displayName: Pack Templates
|
||||
- script: ./src/ProjectTemplates/build.cmd -ci -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true /bl:artifacts/log/template.test.binlog"
|
||||
displayName: Test Templates
|
||||
continueOnError: true # Continue on error to avoid issues with stabilized build.
|
||||
artifacts:
|
||||
- name: Windows_Test_Templates_Logs
|
||||
path: artifacts/log/
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@
|
|||
<ItemsToPushToBlobFeed Remove="@(ItemsToPushToBlobFeed)" Condition="'$(OS)' != 'Windows_NT'" />
|
||||
|
||||
<ItemsToPushToBlobFeed Include="@(_InstallersToPublish)">
|
||||
<IsShipping>false</IsShipping>
|
||||
<ManifestArtifactData>NonShipping=true;ShipInstaller=dotnetcli</ManifestArtifactData>
|
||||
<IsShipping>true</IsShipping>
|
||||
<ManifestArtifactData>ShipInstaller=dotnetcli</ManifestArtifactData>
|
||||
<PublishFlatContainer>true</PublishFlatContainer>
|
||||
<RelativeBlobPath>$(_UploadPathRoot)/%(_InstallersToPublish.UploadPathSegment)/$(_PackageVersion)/%(Filename)%(Extension)</RelativeBlobPath>
|
||||
</ItemsToPushToBlobFeed>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,13 @@
|
|||
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
|
||||
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
|
||||
<PreReleasePreviewNumber>2</PreReleasePreviewNumber>
|
||||
|
||||
<!--
|
||||
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
|
||||
-->
|
||||
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">true</StabilizePackageVersion>
|
||||
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
|
||||
|
||||
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
|
||||
<IncludePreReleaseLabelInPackageVersion Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</IncludePreReleaseLabelInPackageVersion>
|
||||
<PreReleaseVersionLabel>rc$(PreReleasePreviewNumber)</PreReleaseVersionLabel>
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@
|
|||
<_Parameter1>SharedFxVersion</_Parameter1>
|
||||
<_Parameter2>$(SharedFxVersion)</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>TargetingPackVersion</_Parameter1>
|
||||
<_Parameter2>$(TargetingPackVersion)</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>TargetRuntimeIdentifier</_Parameter1>
|
||||
<_Parameter2>$(TargetRuntimeIdentifier)</_Parameter2>
|
||||
|
|
@ -57,11 +53,35 @@
|
|||
</ItemGroup>
|
||||
|
||||
<Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="InitializeSourceControlInformation">
|
||||
<!-- This target is defined in eng/targets/Packaging.targets and included in every C# and F# project. -->
|
||||
<MSBuild Projects="$(RepoRoot)src\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj"
|
||||
Targets="_GetPackageVersionInfo"
|
||||
SkipNonexistentProjects="false">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_RuntimePackageVersionInfo" />
|
||||
</MSBuild>
|
||||
|
||||
<!-- Runtime and Ref packs may have separate versions. -->
|
||||
<MSBuild Projects="$(RepoRoot)src\Framework\ref\Microsoft.AspNetCore.App.Ref.csproj"
|
||||
Targets="_GetPackageVersionInfo"
|
||||
SkipNonexistentProjects="false">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_TargetingPackVersionInfo" />
|
||||
</MSBuild>
|
||||
|
||||
<ItemGroup>
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>RepositoryCommit</_Parameter1>
|
||||
<_Parameter2>$(SourceRevisionId)</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>RuntimePackageVersion</_Parameter1>
|
||||
<_Parameter2>@(_RuntimePackageVersionInfo->'%(PackageVersion)')</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>TargetingPackVersion</_Parameter1>
|
||||
<_Parameter2>@(_TargetingPackVersionInfo->'%(PackageVersion)')</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore
|
|||
_output = output;
|
||||
_expectedTfm = "netcoreapp" + TestData.GetSharedFxVersion().Substring(0, 3);
|
||||
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
|
||||
_sharedFxRoot = Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", "Microsoft.AspNetCore.App", TestData.GetSharedFxVersion());
|
||||
_sharedFxRoot = Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", "Microsoft.AspNetCore.App", TestData.GetTestDataValue("RuntimePackageVersion"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore
|
|||
|
||||
var target = $".NETCoreApp,Version=v{TestData.GetSharedFxVersion().Substring(0, 3)}/{_expectedRid}";
|
||||
var ridPackageId = $"Microsoft.AspNetCore.App.Runtime.{_expectedRid}";
|
||||
var libraryId = $"{ridPackageId}/{TestData.GetSharedFxVersion()}";
|
||||
var libraryId = $"{ridPackageId}/{TestData.GetTestDataValue("RuntimePackageVersion")}";
|
||||
|
||||
AssertEx.FileExists(depsFilePath);
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ namespace Microsoft.AspNetCore
|
|||
var lines = File.ReadAllLines(versionFile);
|
||||
Assert.Equal(2, lines.Length);
|
||||
Assert.Equal(TestData.GetRepositoryCommit(), lines[0]);
|
||||
Assert.Equal(TestData.GetSharedFxVersion(), lines[1]);
|
||||
Assert.Equal(TestData.GetTestDataValue("RuntimePackageVersion"), lines[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,5 +12,9 @@
|
|||
<DebianPackageArch Condition=" '$(TargetArchitecture)' == 'x64' ">amd64</DebianPackageArch>
|
||||
|
||||
<DebianBuildScript>$(MSBuildThisFileDirectory)tools/build.sh</DebianBuildScript>
|
||||
|
||||
<!-- All installers are shipping assets. -->
|
||||
<IsShipping>true</IsShipping>
|
||||
<IsShippingPackage>true</IsShippingPackage>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -4,10 +4,14 @@
|
|||
<Project>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
|
||||
|
||||
<!-- Output paths -->
|
||||
<PropertyGroup>
|
||||
<!-- Output paths -->
|
||||
<IntermediateOutputPath>$(IntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
|
||||
<OutputPath>$(InstallersOutputPath)</OutputPath>
|
||||
|
||||
<!-- All installers are shipping assets. -->
|
||||
<IsShipping>true</IsShipping>
|
||||
<IsShippingPackage>true</IsShippingPackage>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,13 @@
|
|||
<PropertyGroup>
|
||||
<MsiFullPath>$(InstallersOutputPath)$(PackageFileName)</MsiFullPath>
|
||||
<CabFullPath>$(InstallersOutputPath)$(Cabinet)</CabFullPath>
|
||||
|
||||
<!-- Everything built in this project _except_ the final package are shipping assets. -->
|
||||
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
|
||||
<_GeneratedPackageVersion
|
||||
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
||||
'$(ProductNameShort)' ^
|
||||
'$(MsiFullPath)' ^
|
||||
|
|
@ -93,7 +99,7 @@
|
|||
'$(ToolsetInstallerNuspecFile)' ^
|
||||
'$(ArtifactsNonShippingPackagesDir)' ^
|
||||
'$(Platform)' ^
|
||||
'$(PackageVersion)' ^
|
||||
'$(_GeneratedPackageVersion)' ^
|
||||
'$(RepoRoot)' ^
|
||||
'$(AspNetCoreMajorVersion)' ^
|
||||
'$(AspNetCoreMinorVersion)'" />
|
||||
|
|
|
|||
|
|
@ -80,7 +80,13 @@
|
|||
<Target Name="CreateTargetingPackNugetPackage" AfterTargets="CopyToArtifactsDirectory;Build">
|
||||
<PropertyGroup>
|
||||
<MsiFullPath>$(InstallersOutputPath)$(PackageFileName)</MsiFullPath>
|
||||
|
||||
<!-- Everything built in this project _except_ the final package are shipping assets. -->
|
||||
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
|
||||
<_GeneratedPackageVersion
|
||||
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
||||
'$(ProductNameShort)' ^
|
||||
'$(MsiFullPath)' ^
|
||||
|
|
@ -88,7 +94,7 @@
|
|||
'$(ToolsetInstallerNuspecFile)' ^
|
||||
'$(ArtifactsNonShippingPackagesDir)' ^
|
||||
'$(Platform)' ^
|
||||
'$(PackageVersion)' ^
|
||||
'$(_GeneratedPackageVersion)' ^
|
||||
'$(RepoRoot)' ^
|
||||
'$(AspNetCoreMajorVersion)' ^
|
||||
'$(AspNetCoreMinorVersion)'" />
|
||||
|
|
|
|||
|
|
@ -1,9 +1,22 @@
|
|||
<Project>
|
||||
<Target
|
||||
Name="GenerateTestProps"
|
||||
<Target Name="GenerateTestProps"
|
||||
BeforeTargets="CoreCompile"
|
||||
DependsOnTargets="PrepareForTest"
|
||||
Condition="$(DesignTimeBuild) != true">
|
||||
<!-- The version of the shared framework. This is used in tests to ensure they run against the shared framework version we just built. -->
|
||||
<MSBuild Projects="$(RepoRoot)src\Framework\ref\Microsoft.AspNetCore.App.Ref.csproj"
|
||||
Targets="_GetPackageVersionInfo"
|
||||
SkipNonexistentProjects="false">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_TargetingPackVersionInfo" />
|
||||
</MSBuild>
|
||||
|
||||
<!-- Runtime and Ref packs may have separate versions. -->
|
||||
<MSBuild Projects="$(RepoRoot)src\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj"
|
||||
Targets="_GetPackageVersionInfo"
|
||||
SkipNonexistentProjects="false">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_RuntimePackageVersionInfo" />
|
||||
</MSBuild>
|
||||
|
||||
<PropertyGroup>
|
||||
<PropsProperties>
|
||||
RestoreAdditionalProjectSources=$([MSBuild]::Escape("$(RestoreAdditionalProjectSources);$(ArtifactsShippingPackagesDir);$(ArtifactsNonShippingPackagesDir)"));
|
||||
|
|
@ -12,7 +25,8 @@
|
|||
MicrosoftNETCoreAppRefPackageVersion=$(MicrosoftNETCoreAppRefPackageVersion);
|
||||
MicrosoftNETCorePlatformsPackageVersion=$(MicrosoftNETCorePlatformsPackageVersion);
|
||||
MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion);
|
||||
MicrosoftAspNetCoreAppPackageVersion=$(SharedFxVersion);
|
||||
MicrosoftAspNetCoreAppRefPackageVersion=@(_TargetingPackVersionInfo->'%(PackageVersion)');
|
||||
MicrosoftAspNetCoreAppRuntimePackageVersion=@(_RuntimePackageVersionInfo->'%(PackageVersion)');
|
||||
SupportedRuntimeIdentifiers=$(SupportedRuntimeIdentifiers);
|
||||
</PropsProperties>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
<KnownFrameworkReference
|
||||
Update="Microsoft.AspNetCore.App"
|
||||
DefaultRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppPackageVersion}"
|
||||
LatestRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppPackageVersion}"
|
||||
TargetingPackVersion="${MicrosoftAspNetCoreAppPackageVersion}"
|
||||
DefaultRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppRuntimePackageVersion}"
|
||||
LatestRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppRuntimePackageVersion}"
|
||||
TargetingPackVersion="${MicrosoftAspNetCoreAppRefPackageVersion}"
|
||||
RuntimePackRuntimeIdentifiers="${SupportedRuntimeIdentifiers}" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.2.1" Version="$(MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion)" PrivateAssets="All" />
|
||||
<Reference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.2.2" Version="$(MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.0.x86" Version="$(PackageVersion)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.0.x64" Version="$(PackageVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -39,7 +37,25 @@
|
|||
</ItemGroup>
|
||||
|
||||
<Target Name="AddContent" BeforeTargets="_GetPackageFiles">
|
||||
<!-- Cannot assume this project and LB.csproj have the same package version. -->
|
||||
<!-- This target is defined in eng/targets/Packaging.targets and included in every C# and F# project. -->
|
||||
<MSBuild Projects="$(RepoRoot)src\SiteExtensions\LoggingBranch\LB.csproj"
|
||||
Targets="_GetPackageVersionInfo"
|
||||
SkipNonexistentProjects="false">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" />
|
||||
</MSBuild>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.0.x86"
|
||||
Version="%(_ResolvedPackageVersionInfo.PackageVersion)"
|
||||
PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.0.x64"
|
||||
Version="%(_ResolvedPackageVersionInfo.PackageVersion)"
|
||||
PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- LB.csproj package content is bundled into this one. -->
|
||||
<ContentFilesToPack Include="$(NugetPackageRoot)\%(PackageReference.Identity)\%(PackageReference.Version)\content\**\*.*" />
|
||||
|
||||
<!-- Temporarily skip the common files -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue