From b1b3d5474f32a37408836c7e32a307fe128cf17f Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 18 Sep 2020 11:07:42 -0700 Subject: [PATCH] Enable PostBuildSign flag and include signing information in the manifest (#26033) This change is prep for post build signing. When PostBuildSign=true, signing is not performed during the build. Instead, pass the top-level artifacts that are signable to PushToAzureDevOpsArtifacts (via Publish.proj). Also fix up ArtifactsDir. As far as I can tell, it's been fixed up in Arcade to always include the trailing \, and Publish.proj should no longer be messed up. --- eng/AfterSigning.targets | 4 +- eng/Publishing.props | 33 ++++++++-------- eng/Signing.props | 52 +++++++++++++++++++++++--- src/Components/Directory.Build.targets | 2 +- 4 files changed, 65 insertions(+), 26 deletions(-) diff --git a/eng/AfterSigning.targets b/eng/AfterSigning.targets index 3b11f73941..d9205a0d56 100644 --- a/eng/AfterSigning.targets +++ b/eng/AfterSigning.targets @@ -1,9 +1,7 @@ - - $(ArtifactsDir.Substring(0, $([MSBuild]::Subtract($(ArtifactsDir.Length), 1)))) - $(ArtifactsDir)\installers\ + $(ArtifactsDir)installers\ <_SuppressSdkImports>false diff --git a/eng/Publishing.props b/eng/Publishing.props index f6c6fe21a0..39c3ea1f4c 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -4,9 +4,6 @@ - - $(ArtifactsDir.Substring(0, $([MSBuild]::Subtract($(ArtifactsDir.Length), 1)))) - $(PublishDependsOnTargets);_PublishInstallersAndChecksums <_UploadPathRoot>aspnetcore @@ -15,23 +12,23 @@ - + <_InstallersToPublish Remove="@(_InstallersToPublish)" /> - <_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.jar" UploadPathSegment="jar" /> - <_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.pom" UploadPathSegment="jar" /> - <_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.tgz" UploadPathSegment="npm" /> - <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.deb" UploadPathSegment="Runtime" /> - <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.exe" UploadPathSegment="Runtime" /> - <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.msi" UploadPathSegment="Runtime" /> - <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.rpm" UploadPathSegment="Runtime" /> - <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.tar.gz" UploadPathSegment="Runtime" /> - <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.version" UploadPathSegment="Runtime" + <_InstallersToPublish Include="$(ArtifactsDir)packages\**\*.jar" UploadPathSegment="jar" /> + <_InstallersToPublish Include="$(ArtifactsDir)packages\**\*.pom" UploadPathSegment="jar" /> + <_InstallersToPublish Include="$(ArtifactsDir)packages\**\*.tgz" UploadPathSegment="npm" /> + <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.deb" UploadPathSegment="Runtime" /> + <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.exe" UploadPathSegment="Runtime" /> + <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.msi" UploadPathSegment="Runtime" /> + <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.rpm" UploadPathSegment="Runtime" /> + <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.tar.gz" UploadPathSegment="Runtime" /> + <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.version" UploadPathSegment="Runtime" Condition=" '$(PublishInstallerBaseVersion)' == 'true' " /> - <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.wixlib" UploadPathSegment="Runtime" /> - <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.zip" UploadPathSegment="Runtime" /> - <_ChecksumsToPublish Include="$(ArtifactsDir)\**\*.sha512" /> + <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.wixlib" UploadPathSegment="Runtime" /> + <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.zip" UploadPathSegment="Runtime" /> + <_ChecksumsToPublish Include="$(ArtifactsDir)**\*.sha512" /> @@ -67,6 +64,10 @@ true $(_UploadPathRoot)/%(_InstallersToPublish.UploadPathSegment)/$(_PackageVersion)/%(Filename)%(Extension) + + + + diff --git a/eng/Signing.props b/eng/Signing.props index 7761031a3b..f35228b20f 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -9,12 +9,43 @@ - - - - - + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x64\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" /> <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x86\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" /> @@ -98,7 +134,11 @@ <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm\host\**\*.dll" CertificateName="None" /> <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm64\host\**\*.dll" CertificateName="None" /> <_DotNetFilesToExclude Include="$(RedistNetCorePath)dotnet.exe" CertificateName="None" /> - + + + + +