Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions eng/Publishing.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,6 @@
<ItemGroup>
<!-- Include our "loose" PDBs when publishing symbols. -->
<FilesToPublishToSymbolServer Include="$(ArtifactsDir)symbols\**\*.pdb" />

<!-- Prepare for _PublishInstallersAndChecksums target. -->
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.jar" UploadPathSegment="jar/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.pom" UploadPathSegment="jar/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
<!-- All builds produce npm assets - only publish them once -->
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tgz" UploadPathSegment="npm/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.version" UploadPathSegment="Runtime/" Condition="'$(PublishInstallerBaseVersion)' == 'true'" />

<!-- The following installers create checksums -->
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.deb" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.rpm" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tar.gz" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.zip" Exclude="$(ArtifactsPackagesDir)**\*.wixpack.zip" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />

<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" Exclude="$(ArtifactsDir)installers\$(Configuration)\**\*.wixpack.zip" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />

<Artifact Include="@(_InstallersToPublish)" Kind="Blob">
<!-- Working around msbuild not being able to negate the result of Contains() outside of targets -->
<IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) == 'True'">false</IsShipping>
<IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) != 'True'">true</IsShipping>
</Artifact>
</ItemGroup>

<Target Name="GetNonStableProductVersion">
Expand Down
77 changes: 28 additions & 49 deletions eng/Signing.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,12 @@
<!-- See https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Signing.md for details. -->
<Import Project="Common.props" />

<ItemGroup>
<!-- Reset Arcade's defaults. -->
<ItemsToSign Remove="@(ItemsToSign)" />
<ItemsToSignPostBuild Remove="@(ItemsToSignPostBuild)" />
<FileExtensionSignInfo Remove="@(FileExtensionSignInfo)" />
</ItemGroup>

<PropertyGroup>
<!-- Use the dotnet certificate for any remaining defaults (e.g. StrongNameSignInfo) -->
<UseDotNetCertificate>true</UseDotNetCertificate>
</PropertyGroup>

<!-- Files that should be always be signed -->
<ItemGroup Label="Common Files to Sign">
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.nupkg" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.exe" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.msi" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.jar" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.zip" />
<ItemsToSign Include="$(VisualStudioSetupOutputPath)**\*.vsix" />
<ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" />
<ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" />
<ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" />
<ItemsToSign Remove="$(ArtifactsPackagesDir)**\*symbols.nupkg" />
</ItemGroup>

<ItemGroup Label="File signing information">
<!--
Map file extensions to a code-sign cert.
"None" means don't sign the file itself, but still scan the contents for signable files.
-->
<FileExtensionSignInfo Include=".jar" CertificateName="MicrosoftJARSHA2" />
<FileExtensionSignInfo Include=".ps1;.psd1;.psm1;.psc1" CertificateName="MicrosoftDotNet500" />
<FileExtensionSignInfo Include=".dll;.exe" CertificateName="MicrosoftDotNet500" />
<FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
<FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
<FileExtensionSignInfo Include=".zip" CertificateName="None" />
<FileExtensionSignInfo Include=".cab" CertificateName="None" />
<FileExtensionSignInfo Include=".msi" CertificateName="MicrosoftDotNet500" />

<!-- Native .dll's. These don't have a public key token, but are from Microsoft and should be signed. -->
<FileSignInfo Include="aspnetcore.dll" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="aspnetcorev2_inprocess.dll" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="aspnetcorev2_outofprocess.dll" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="aspnetcorev2.dll" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="blazor-devserver.exe" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="dotnet-dev-certs.exe" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="dotnet-sql-cache.exe" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="dotnet-user-secrets.exe" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="dotnet-watch.exe" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="dotnet-openapi.exe" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="dotnet-user-jwts.exe" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="Microsoft.AspNetCore.Blazor.Build.exe" CertificateName="MicrosoftDotNet500" />
<FileSignInfo Include="sni.dll" CertificateName="MicrosoftDotNet500" />

<!-- Third-party components which should be signed. -->
<FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="AngleSharp.dll" CertificateName="3PartySHA2" />
Expand Down Expand Up @@ -121,4 +72,32 @@
<FileSignInfo Include="Microsoft.Identity.Client.dll" CertificateName="None" />
</ItemGroup>

<!-- $(InstallersOutputPath), $(SymbolsOutputPath), and $(ChecksumExtensions) are not defined. Root Directory.Build.props is not imported. -->
<ItemGroup>
<!-- Prepare for _PublishInstallersAndChecksums target. -->
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.jar" UploadPathSegment="jar/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.pom" UploadPathSegment="jar/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
<!-- All builds produce npm assets - only publish them once -->
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tgz" UploadPathSegment="npm/" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.version" UploadPathSegment="Runtime/" Condition="'$(PublishInstallerBaseVersion)' == 'true'" />

<!-- The following installers create checksums -->
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.deb" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.rpm" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tar.gz" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.zip" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />

<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
<_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider grouping all these together into one item (with a ; as the separator per line) so that the metadata doesn't need to be defined everytime.


<Artifact Include="@(_InstallersToPublish)" Kind="Blob">
<!-- Working around msbuild not being able to negate the result of Contains() outside of targets -->
<IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) == 'True'">false</IsShipping>
<IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) != 'True'">true</IsShipping>
</Artifact>
</ItemGroup>

</Project>
Loading