Add arcade overrides from baseline - 3600aa80a01e90f38a7b86b9d7c1264e091aa5a8
This commit is contained in:
parent
2b787c2559
commit
1c38575cf1
2 changed files with 185 additions and 0 deletions
|
@ -0,0 +1,99 @@
|
||||||
|
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
|
||||||
|
<Project>
|
||||||
|
|
||||||
|
<!-- Repo extensibility point. -->
|
||||||
|
<Import Project="$(RepositoryEngineeringDir)SourceBuild.props" Condition="Exists('$(RepositoryEngineeringDir)SourceBuild.props')" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<SourceBuildOutputDir Condition="'$(SourceBuildOutputDir)' == ''">$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'source-build'))</SourceBuildOutputDir>
|
||||||
|
<SourceBuildSelfDir>$([MSBuild]::NormalizeDirectory('$(SourceBuildOutputDir)', 'self'))</SourceBuildSelfDir>
|
||||||
|
<CurrentRepoSourceBuildSourceDir>$([MSBuild]::NormalizeDirectory('$(SourceBuildSelfDir)', 'src'))</CurrentRepoSourceBuildSourceDir>
|
||||||
|
<CurrentRepoSourceBuildPackageCache>$([MSBuild]::NormalizeDirectory('$(SourceBuildSelfDir)', 'package-cache'))</CurrentRepoSourceBuildPackageCache>
|
||||||
|
<SourceBuildSelfPrebuiltReportDir>$([MSBuild]::NormalizeDirectory('$(SourceBuildSelfDir)', 'prebuilt-report'))</SourceBuildSelfPrebuiltReportDir>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Keep artifacts/ inside source dir so that ancestor-based file lookups find the inner repo, not
|
||||||
|
the outer repo. The inner repo global.json and NuGet.config files may have been modified by
|
||||||
|
source-build, and we want projects inside the artifacts/ dir to respect that.
|
||||||
|
-->
|
||||||
|
<CurrentRepoSourceBuildArtifactsDir>$([MSBuild]::NormalizeDirectory('$(CurrentRepoSourceBuildSourceDir)', 'artifacts'))</CurrentRepoSourceBuildArtifactsDir>
|
||||||
|
<CurrentRepoSourceBuildArtifactsPackagesDir>$([MSBuild]::NormalizeDirectory('$(CurrentRepoSourceBuildArtifactsDir)', 'packages', '$(Configuration)'))</CurrentRepoSourceBuildArtifactsPackagesDir>
|
||||||
|
|
||||||
|
<CurrentRepoSourceBuiltNupkgCacheDir>$([MSBuild]::NormalizeDirectory('$(CurrentRepoSourceBuildArtifactsDir)', 'obj', 'source-built-upstream-cache'))</CurrentRepoSourceBuiltNupkgCacheDir>
|
||||||
|
|
||||||
|
<PrebuiltBaselineDataFileDefault>$(RepositoryEngineeringDir)SourceBuildPrebuiltBaseline.xml</PrebuiltBaselineDataFileDefault>
|
||||||
|
<PrebuiltBaselineDataFile Condition="Exists('$(PrebuiltBaselineDataFileDefault)')">$(PrebuiltBaselineDataFileDefault)</PrebuiltBaselineDataFile>
|
||||||
|
|
||||||
|
<!-- By default, use the license file from the root of the repo for the intermediate nupkg. -->
|
||||||
|
<DetectSourceBuildIntermediateNupkgLicense Condition="'$(DetectSourceBuildIntermediateNupkgLicense)' == ''">true</DetectSourceBuildIntermediateNupkgLicense>
|
||||||
|
|
||||||
|
<EnableDefaultSourceBuildIntermediateItems Condition="'$(EnableDefaultSourceBuildIntermediateItems)' == ''">true</EnableDefaultSourceBuildIntermediateItems>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="GetSourceBuildIntermediateNupkgNameConvention">
|
||||||
|
<PropertyGroup Condition="'$(SourceBuildNonPortable)' == 'true' and '$(TargetRid)' == ''">
|
||||||
|
<TargetRid>$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(TargetRid)' == ''">
|
||||||
|
<HostArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</HostArchitecture>
|
||||||
|
<SourceBuildTargetArchitecture Condition="'$(SourceBuildTargetArchitecture)' == ''">$(HostArchitecture)</SourceBuildTargetArchitecture>
|
||||||
|
|
||||||
|
<SourceBuildTargetPortableOSPlatform Condition="$([MSBuild]::IsOSPlatform('windows'))">win</SourceBuildTargetPortableOSPlatform>
|
||||||
|
<SourceBuildTargetPortableOSPlatform Condition="$([MSBuild]::IsOSPlatform('osx'))">osx</SourceBuildTargetPortableOSPlatform>
|
||||||
|
<SourceBuildTargetPortableOSPlatform Condition="$([MSBuild]::IsOSPlatform('linux'))">linux</SourceBuildTargetPortableOSPlatform>
|
||||||
|
<SourceBuildTargetPortableOSPlatform Condition="'$(SourceBuildTargetPortableOSPlatform)'==''">linux</SourceBuildTargetPortableOSPlatform>
|
||||||
|
|
||||||
|
<!-- By default, build for the portable OS platform with host machine architecture. -->
|
||||||
|
<TargetRid>$(SourceBuildTargetPortableOSPlatform)-$(SourceBuildTargetArchitecture)</TargetRid>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- If this repo builds only managed outputs, no RID is used for the intermediate nupkg. -->
|
||||||
|
<PropertyGroup Condition="'$(SourceBuildManagedOnly)' != 'true'">
|
||||||
|
<SourceBuildIntermediateNupkgRid Condition="'$(SourceBuildIntermediateNupkgRid)' == ''">$(TargetRid)</SourceBuildIntermediateNupkgRid>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<SourceBuildIntermediateNupkgPrefix>Microsoft.SourceBuild.Intermediate.</SourceBuildIntermediateNupkgPrefix>
|
||||||
|
<SourceBuildIntermediateNupkgSuffix Condition="'$(SourceBuildIntermediateNupkgRid)' != ''">.$(SourceBuildIntermediateNupkgRid)</SourceBuildIntermediateNupkgSuffix>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Get the list of nupkg contents, categorized into supplemental categories if necessary. By
|
||||||
|
default, all non-symbol-package nupkg files and tar.gz files in
|
||||||
|
'artifacts/packages/{configuration}' are packed in the intermediate nupkg.
|
||||||
|
|
||||||
|
To configure this, add a target to eng/SourceBuild.props with
|
||||||
|
'BeforeTargets="GetCategorizedIntermediateNupkgContents"' that sets up
|
||||||
|
'IntermediateNupkgArtifactFile' items with optional 'Category' metadata.
|
||||||
|
|
||||||
|
When 'Category' is set, this tooling produces one supplemental intermediate nupkg per named
|
||||||
|
category. All files not in a category are put into the "main" intermediate nupkg.
|
||||||
|
-->
|
||||||
|
<Target Name="GetCategorizedIntermediateNupkgContents">
|
||||||
|
<ItemGroup Condition="'$(EnableDefaultSourceBuildIntermediateItems)' == 'true'">
|
||||||
|
<!-- Catch-all: anything not in a category gets packed in the 'main' intermediate nupkg. -->
|
||||||
|
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)**\*.nupkg" />
|
||||||
|
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)**\*.tar.gz" />
|
||||||
|
<!-- Don't pack any symbol packages: not needed for downstream source-build CI. -->
|
||||||
|
<IntermediateNupkgArtifactFile Remove="$(CurrentRepoSourceBuildArtifactsPackagesDir)**\*.symbols.nupkg" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<IntermediateNupkgFile Include="@(IntermediateNupkgArtifactFile)" PackagePath="artifacts" />
|
||||||
|
|
||||||
|
<!-- Report goes into the 'main' intermediate nupkg. -->
|
||||||
|
<IntermediateNupkgFile Include="$(SourceBuildSelfPrebuiltReportDir)**\*" PackagePath="prebuilt-report" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<RemoveDuplicates Inputs="@(IntermediateNupkgFile)">
|
||||||
|
<Output TaskParameter="Filtered" ItemName="IntermediatePackageFile" />
|
||||||
|
</RemoveDuplicates>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<SupplementalIntermediateNupkgCategory Include="%(IntermediatePackageFile.Category)" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
</Project>
|
|
@ -0,0 +1,86 @@
|
||||||
|
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
|
||||||
|
<Project>
|
||||||
|
|
||||||
|
<!-- Shield this project from nonstandard Directory.Build.props/targets. -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<ImportDirectoryPackagesProps>false</ImportDirectoryPackagesProps>
|
||||||
|
<ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
|
||||||
|
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
||||||
|
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||||
|
|
||||||
|
<!-- Import common functionality, including repo extension point. -->
|
||||||
|
<Import Project="$(SourceBuildArcadeTargetsFile)" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Copyright Condition="'$(Copyright)' == ''">$(CopyrightNetFoundation)</Copyright>
|
||||||
|
|
||||||
|
<IsPackable>true</IsPackable>
|
||||||
|
<IsShipping>false</IsShipping>
|
||||||
|
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
|
||||||
|
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||||
|
|
||||||
|
<!-- NuGet excludes nupkgs by default: disable this behavior. -->
|
||||||
|
<NoDefaultExcludes>true</NoDefaultExcludes>
|
||||||
|
|
||||||
|
<!-- Arbitrary TargetFramework to appease SDK. -->
|
||||||
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(SourceBuildIntermediateNupkgLicenseFile)' != ''">
|
||||||
|
<PackageLicenseFile>$([System.IO.Path]::GetFileName('$(SourceBuildIntermediateNupkgLicenseFile)'))</PackageLicenseFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(SourceBuildIntermediateNupkgLicenseFile)' != ''">
|
||||||
|
<None Include="$(SourceBuildIntermediateNupkgLicenseFile)" Pack="true" PackagePath="$(PackageLicenseFile)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="InitializeSourceBuildIntermediatePackageId"
|
||||||
|
DependsOnTargets="GetSourceBuildIntermediateNupkgNameConvention"
|
||||||
|
BeforeTargets="GenerateNuspec;InitializeStandardNuspecProperties">
|
||||||
|
<Error Condition="'$(GitHubRepositoryName)' == ''" Text="GitHubRepositoryName property is not defined." />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<PackageId>$(GitHubRepositoryName)</PackageId>
|
||||||
|
<PackageId Condition="'$(SupplementalIntermediateNupkgCategory)' != ''">$(PackageId).$(SupplementalIntermediateNupkgCategory)</PackageId>
|
||||||
|
|
||||||
|
<PackageId>$(SourceBuildIntermediateNupkgPrefix)$(PackageId)$(SourceBuildIntermediateNupkgSuffix)</PackageId>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="GetIntermediateNupkgArtifactFiles"
|
||||||
|
DependsOnTargets="
|
||||||
|
GetCategorizedIntermediateNupkgContents;
|
||||||
|
GetSupplementalIntermediateNupkgManifest"
|
||||||
|
BeforeTargets="_GetPackageFiles">
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="@(IntermediatePackageFile->WithMetadataValue('Category', '$(SupplementalIntermediateNupkgCategory)'))" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="GetSupplementalIntermediateNupkgManifest"
|
||||||
|
Condition="'$(SupplementalIntermediateNupkgCategory)' == ''"
|
||||||
|
DependsOnTargets="InitializeSourceBuildIntermediatePackageId">
|
||||||
|
<PropertyGroup>
|
||||||
|
<SupplementalIntermediateNupkgManifestFile>$(BaseOutputPath)SupplementalIntermediatePackages.txt</SupplementalIntermediateNupkgManifestFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<WriteLinesToFile
|
||||||
|
File="$(SupplementalIntermediateNupkgManifestFile)"
|
||||||
|
Lines="@(SupplementalIntermediateNupkgCategory->'$(SourceBuildIntermediateNupkgPrefix)$(GitHubRepositoryName).%(Identity)$(SourceBuildIntermediateNupkgSuffix)', '%0A')"
|
||||||
|
Overwrite="true" />
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- The list of supplemental package ids goes into the "main" intermediate nupkg. -->
|
||||||
|
<Content Include="$(SupplementalIntermediateNupkgManifestFile)" PackagePath="." />
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||||
|
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
||||||
|
|
||||||
|
<Target Name="Build" />
|
||||||
|
|
||||||
|
</Project>
|
Loading…
Reference in a new issue