|
| 1 | +From ca11f1fd4393a8c5feb606db786a84696972011f Mon Sep 17 00:00:00 2001 |
| 2 | +From: Jeremy Koritzinsky < [email protected]> |
| 3 | +Date: Wed, 15 Jan 2025 16:04:05 -0800 |
| 4 | +Subject: [PATCH] Make default artifact visibility customizable |
| 5 | + |
| 6 | +We can use this to filter PgoInstrument artifacts down primarily in the VMR orchestrator and only need to make changes in dotnet/sdk to still publish the `dotnet-sdk-pgo-*` archives. |
| 7 | + |
| 8 | +Backport: https://github.com/dotnet/arcade/pull/15419 |
| 9 | +--- |
| 10 | + src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj | 1 + |
| 11 | + src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj | 1 + |
| 12 | + src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props | 4 +++- |
| 13 | + 3 files changed, 5 insertions(+), 1 deletion(-) |
| 14 | + |
| 15 | +diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj |
| 16 | +index b3925190b7c..f698463a6b5 100644 |
| 17 | +--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj |
| 18 | ++++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj |
| 19 | +@@ -13,6 +13,7 @@ |
| 20 | + DotNetSymbolExpirationInDays Symbol expiration time in days (defaults to 10 years). |
| 21 | + SkipPackageChecks Skips package safety checks. |
| 22 | + EnableDefaultArtifacts Includes packages under "/artifacts/packages/**" for publishing. Defaults to true. |
| 23 | ++ DefaultArtifactVisibility The default visibility for Artifact items. Defaults to External. |
| 24 | + DotNetBuildPass While building the repo as part of the entire .NET stack, this parameter specifies which build pass the current build is part of. |
| 25 | + The build pass number gets added to the asset manifest file name to avoid collisions. |
| 26 | + |
| 27 | +diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj |
| 28 | +index b4c7aab2df6..9d48f6d83bb 100644 |
| 29 | +--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj |
| 30 | ++++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj |
| 31 | +@@ -8,6 +8,7 @@ |
| 32 | + Optional variables: |
| 33 | + EnableDefaultArtifacts Includes *.nupkg, *.vsix and *.wixpack.zip under "/artifacts/packages/**" for sigining. |
| 34 | + Defaults to true. |
| 35 | ++ DefaultArtifactVisibility The default visibility for Artifact items. Defaults to External. |
| 36 | + |
| 37 | + Optional items: |
| 38 | + Artifact (with Metadata) Path to the artifact to publish. Declare the item in Signing.props to sign and publish the artifact. |
| 39 | +diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props b/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props |
| 40 | +index 5889e5bacf8..13383c1bb19 100644 |
| 41 | +--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props |
| 42 | ++++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props |
| 43 | +@@ -4,6 +4,8 @@ |
| 44 | + <PropertyGroup> |
| 45 | + <!-- By default, search for sign aritfacts under the list of known directories. --> |
| 46 | + <EnableDefaultArtifacts>true</EnableDefaultArtifacts> |
| 47 | ++ <!-- By default, artifacts are externally visible --> |
| 48 | ++ <DefaultArtifactVisibility>External</DefaultArtifactVisibility> |
| 49 | + </PropertyGroup> |
| 50 | + |
| 51 | + <!-- Repo extension point to sign and/or publish. Artifacts are shipping and blobs by default. --> |
| 52 | +@@ -11,7 +13,7 @@ |
| 53 | + <Artifact> |
| 54 | + <PublishFlatContainer>true</PublishFlatContainer> |
| 55 | + <IsShipping>true</IsShipping> |
| 56 | +- <Visibility>External</Visibility> |
| 57 | ++ <Visibility>$(DefaultArtifactVisibility)</Visibility> |
| 58 | + </Artifact> |
| 59 | + </ItemDefinitionGroup> |
| 60 | + |
0 commit comments