Switch to new VMR control schema. (#10883)

Now that razor is on .NET 9 arcade, it can switch over to the new control schema. For this repo, this is roughly:
- DotNetBuildFromSource -> DotNetBuildSourceOnly - Building a source-only build.
- DotnetBuildFromSourceFlavor == Product -> DotNetBuildOrchestrator == true - Building in the VMR, could be source-only or MS's build.
- ArcadeBuildFromSource -> DotNetBuildRepo == true -> Indicates an outer repo build.
This commit is contained in:
Matt Mitchell 2024-09-13 10:32:10 -07:00 коммит произвёл GitHub
Родитель 742f378c6a
Коммит ca91065e45
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
8 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -24,7 +24,7 @@
<GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods>
<ExcludeFromSourceBuild Condition="'$(IsUnitTestProject)' == 'true'">true</ExcludeFromSourceBuild>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<EnableWindowsTargeting Condition="'$(DotNetBuildFromSource)' != 'true'">true</EnableWindowsTargeting>
<EnableWindowsTargeting Condition="'$(DotNetBuildSourceOnly)' != 'true'">true</EnableWindowsTargeting>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
@ -55,7 +55,7 @@
necessary as the output of this leg is used in other CI source build legs. Those could be
targeting NetCurrent or NetPrevious hence we must produce both.
-->
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' != 'Product'">
<When Condition="'$(DotNetBuildSourceOnly)' == 'true' AND '$(DotNetBuildOrchestrator)' != 'true'">
<PropertyGroup>
<DefaultNetCoreTargetFramework>$(NetCurrent)</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework);$(NetPrevious)</DefaultNetCoreTargetFrameworks>
@ -65,7 +65,7 @@
<!--
2. Source build the product: this is the all up build of the product which needs only NetCurrent
-->
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' == 'Product'">
<When Condition="'$(DotNetBuildSourceOnly)' == 'true' AND '$(DotNetBuildOrchestrator)' == 'true'">
<PropertyGroup>
<DefaultNetCoreTargetFramework>$(NetCurrent)</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework)</DefaultNetCoreTargetFrameworks>

Просмотреть файл

@ -1,6 +1,6 @@
<Project>
<Target Name="_EnsureVSIXWasGenerated" AfterTargets="GenerateVisualStudioInsertionManifests" Condition="'$(OS)'=='WINDOWS_NT' AND '$(ArcadeBuildFromSource)' != 'true'">
<Target Name="_EnsureVSIXWasGenerated" AfterTargets="GenerateVisualStudioInsertionManifests" Condition="'$(OS)'=='WINDOWS_NT' AND '$(DotNetBuildSourceOnly)' != 'true'">
<PropertyGroup>
<VSSetupDir>$(ArtifactsDir)VSSetup\</VSSetupDir>
<RazorExtensionVSIXName>Microsoft.VisualStudio.RazorExtension.vsix</RazorExtensionVSIXName>
@ -27,7 +27,7 @@
AfterTargets="GenerateVisualStudioInsertionManifests"
Inputs="$(_RazorAssemblyVersion)"
Outputs="$(_DependentAssemblyVersionsFile)"
Condition="'$(OS)'=='WINDOWS_NT' AND '$(ArcadeBuildFromSource)' != 'true'">
Condition="'$(OS)'=='WINDOWS_NT' AND '$(DotNetBuildSourceOnly)' != 'true'">
<ItemGroup>
<_AssemblyVersionEntry Include="RazorRuntimeAssembly" />
<_AssemblyVersionEntry Include="RazorToolingAssembly" />

Просмотреть файл

@ -27,7 +27,7 @@
<ItemGroup>
<!-- Packages can be built on all platforms, but are only published on Windows to avoid collisions from the other
platforms. This does not affect the SB intermediate package. -->
<ItemsToPushToBlobFeed Remove="$(ArtifactsDir)**\*.nupkg" Condition="'$(OS)' != 'Windows_NT' and '$(ArcadeBuildFromSource)' != 'true'" />
<ItemsToPushToBlobFeed Remove="$(ArtifactsDir)**\*.nupkg" Condition="'$(OS)' != 'Windows_NT' and '$(DotNetBuild)' != 'true'" />
<ItemsToPushToBlobFeed Include="@(_ItemsToPublish)">
<IsShipping>false</IsShipping>

Просмотреть файл

@ -2,6 +2,6 @@
# We could potentially try to find an existing installation that has all the required runtimes,
# but it's unlikely one will be available.
if [ "${DotNetBuildFromSource:-false}" = false ]; then
if [ "${DotNetBuildSourceOnly:-false}" = false ]; then
use_installed_dotnet_cli="false"
fi

Просмотреть файл

@ -9,7 +9,7 @@ set -euo pipefail
scriptroot="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
reporoot="$(dirname "$(dirname "$scriptroot")")"
export DotNetBuildFromSource='true'
export DotNetBuildSourceOnly='true'
# Build repo tasks
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj "$@"

Просмотреть файл

@ -37,7 +37,7 @@
<WarningsNotAsErrors>$(WarningsNotAsErrors);xUnit1004</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" NoWarn="NU1608" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="All" />
<PackageReference Include="Roslyn.Diagnostics.Analyzers" PrivateAssets="All" />

Просмотреть файл

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<_RoslynPackageVersion>4.9.2</_RoslynPackageVersion>
<_RoslynPackageVersion Condition="'$(DotNetBuildFromSource)' == 'true'">$(MicrosoftCodeAnalysisCommonPackageVersion)</_RoslynPackageVersion>
<_RoslynPackageVersion Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(MicrosoftCodeAnalysisCommonPackageVersion)</_RoslynPackageVersion>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Packages.props, $(MSBuildThisFileDirectory)..))" />

Просмотреть файл

@ -14,7 +14,7 @@
<RollForward Condition="'$(IsTestProject)' == 'true'">LatestMajor</RollForward>
</PropertyGroup>
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" NoWarn="NU1608" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" />
<PackageReference Include="Roslyn.Diagnostics.Analyzers" />