|
2 | 2 | <!-- See https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Signing.md for details. --> |
3 | 3 | <Import Project="Common.props" /> |
4 | 4 |
|
5 | | - <ItemGroup> |
6 | | - <!-- Reset Arcade's defaults. --> |
7 | | - <ItemsToSign Remove="@(ItemsToSign)" /> |
8 | | - <ItemsToSignPostBuild Remove="@(ItemsToSignPostBuild)" /> |
9 | | - <FileExtensionSignInfo Remove="@(FileExtensionSignInfo)" /> |
10 | | - </ItemGroup> |
11 | | - |
12 | 5 | <PropertyGroup> |
13 | 6 | <!-- Use the dotnet certificate for any remaining defaults (e.g. StrongNameSignInfo) --> |
14 | 7 | <UseDotNetCertificate>true</UseDotNetCertificate> |
15 | 8 | </PropertyGroup> |
16 | 9 |
|
17 | | - <!-- Files that should be always be signed --> |
18 | | - <ItemGroup Label="Common Files to Sign"> |
19 | | - <ItemsToSign Include="$(ArtifactsPackagesDir)**\*.nupkg" /> |
20 | | - <ItemsToSign Include="$(ArtifactsPackagesDir)**\*.exe" /> |
21 | | - <ItemsToSign Include="$(ArtifactsPackagesDir)**\*.msi" /> |
22 | | - <ItemsToSign Include="$(ArtifactsPackagesDir)**\*.jar" /> |
23 | | - <ItemsToSign Include="$(ArtifactsPackagesDir)**\*.zip" /> |
24 | | - <ItemsToSign Include="$(VisualStudioSetupOutputPath)**\*.vsix" /> |
25 | | - <ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" /> |
26 | | - <ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" /> |
27 | | - <ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" /> |
28 | | - <ItemsToSign Remove="$(ArtifactsPackagesDir)**\*symbols.nupkg" /> |
29 | | - </ItemGroup> |
30 | | - |
31 | 10 | <ItemGroup Label="File signing information"> |
32 | | - <!-- |
33 | | - Map file extensions to a code-sign cert. |
34 | | - "None" means don't sign the file itself, but still scan the contents for signable files. |
35 | | - --> |
36 | | - <FileExtensionSignInfo Include=".jar" CertificateName="MicrosoftJARSHA2" /> |
37 | | - <FileExtensionSignInfo Include=".ps1;.psd1;.psm1;.psc1" CertificateName="MicrosoftDotNet500" /> |
38 | | - <FileExtensionSignInfo Include=".dll;.exe" CertificateName="MicrosoftDotNet500" /> |
39 | | - <FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" /> |
40 | | - <FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" /> |
41 | | - <FileExtensionSignInfo Include=".zip" CertificateName="None" /> |
42 | | - <FileExtensionSignInfo Include=".cab" CertificateName="None" /> |
| 11 | + <!-- Arcade does not set a default for .msi's --> |
43 | 12 | <FileExtensionSignInfo Include=".msi" CertificateName="MicrosoftDotNet500" /> |
44 | 13 |
|
45 | | - <!-- Native .dll's. These don't have a public key token, but are from Microsoft and should be signed. --> |
46 | | - <FileSignInfo Include="aspnetcore.dll" CertificateName="MicrosoftDotNet500" /> |
47 | | - <FileSignInfo Include="aspnetcorev2_inprocess.dll" CertificateName="MicrosoftDotNet500" /> |
48 | | - <FileSignInfo Include="aspnetcorev2_outofprocess.dll" CertificateName="MicrosoftDotNet500" /> |
49 | | - <FileSignInfo Include="aspnetcorev2.dll" CertificateName="MicrosoftDotNet500" /> |
50 | | - <FileSignInfo Include="blazor-devserver.exe" CertificateName="MicrosoftDotNet500" /> |
51 | | - <FileSignInfo Include="dotnet-dev-certs.exe" CertificateName="MicrosoftDotNet500" /> |
52 | | - <FileSignInfo Include="dotnet-sql-cache.exe" CertificateName="MicrosoftDotNet500" /> |
53 | | - <FileSignInfo Include="dotnet-user-secrets.exe" CertificateName="MicrosoftDotNet500" /> |
54 | | - <FileSignInfo Include="dotnet-watch.exe" CertificateName="MicrosoftDotNet500" /> |
55 | | - <FileSignInfo Include="dotnet-openapi.exe" CertificateName="MicrosoftDotNet500" /> |
56 | | - <FileSignInfo Include="dotnet-user-jwts.exe" CertificateName="MicrosoftDotNet500" /> |
57 | | - <FileSignInfo Include="Microsoft.AspNetCore.Blazor.Build.exe" CertificateName="MicrosoftDotNet500" /> |
58 | | - <FileSignInfo Include="sni.dll" CertificateName="MicrosoftDotNet500" /> |
59 | | - |
60 | 14 | <!-- Third-party components which should be signed. --> |
61 | 15 | <FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" /> |
62 | 16 | <FileSignInfo Include="AngleSharp.dll" CertificateName="3PartySHA2" /> |
|
72 | 26 | </PropertyGroup> |
73 | 27 |
|
74 | 28 | <ItemGroup Label="Code sign exclusions"> |
75 | | - <!-- We don't need to code sign .js files because they are not used in Windows Script Host. --> |
76 | | - <FileExtensionSignInfo Include=".js" CertificateName="None" /> |
77 | 29 | <!-- We don't produce font files. We rebundle some for using the web browser, so they do not need to be signed. --> |
78 | | - <FileExtensionSignInfo Include=".otf" CertificateName="None" /> |
79 | | - <FileExtensionSignInfo Include=".ttf" CertificateName="None" /> |
| 30 | + <FileExtensionSignInfo Update=".otf" CertificateName="None" /> |
| 31 | + <FileExtensionSignInfo Update=".ttf" CertificateName="None" /> |
80 | 32 | <!-- This is a text file which doesn't need to be code signed, even though some .mof files can be signed. --> |
81 | 33 | <FileSignInfo Include="ancm.mof" CertificateName="None" /> |
82 | 34 | <!-- Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it. --> |
|
121 | 73 | <FileSignInfo Include="Microsoft.Identity.Client.dll" CertificateName="None" /> |
122 | 74 | </ItemGroup> |
123 | 75 |
|
| 76 | + <!-- $(InstallersOutputPath), $(SymbolsOutputPath), and $(ChecksumExtensions) are not defined. Root Directory.Build.props is not imported. --> |
| 77 | + <ItemGroup> |
| 78 | + <!-- Prepare for _PublishInstallersAndChecksums target. --> |
| 79 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.jar" UploadPathSegment="jar/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" /> |
| 80 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.pom" UploadPathSegment="jar/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" /> |
| 81 | + <!-- All builds produce npm assets - only publish them once --> |
| 82 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tgz" UploadPathSegment="npm/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" /> |
| 83 | + <_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.version" UploadPathSegment="Runtime/" Condition="'$(PublishInstallerBaseVersion)' == 'true'" /> |
| 84 | + |
| 85 | + <!-- The following installers create checksums --> |
| 86 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.deb" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" /> |
| 87 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.rpm" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" /> |
| 88 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tar.gz" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" /> |
| 89 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" /> |
| 90 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" /> |
| 91 | + <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.zip" UploadPathSegment="Runtime/" > |
| 92 | + <ChecksumPath Condition="$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'">%(FullPath).sha512</ChecksumPath> |
| 93 | + </_InstallersToPublish> |
| 94 | + |
| 95 | + <_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" /> |
| 96 | + <_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" /> |
| 97 | + <_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" UploadPathSegment="Runtime/" > |
| 98 | + <ChecksumPath Condition="$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'">%(FullPath).sha512</ChecksumPath> |
| 99 | + </_InstallersToPublish> |
| 100 | + |
| 101 | + <Artifact Include="@(_InstallersToPublish)" Kind="Blob"> |
| 102 | + <!-- Working around msbuild not being able to negate the result of Contains() outside of targets --> |
| 103 | + <IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) == 'True'">false</IsShipping> |
| 104 | + <IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) != 'True'">true</IsShipping> |
| 105 | + </Artifact> |
| 106 | + </ItemGroup> |
| 107 | + |
124 | 108 | </Project> |
0 commit comments