Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 7a2c097

Browse files
authored
Merge pull request #6070 from wtgodbe/sign
Only sign non-arm64 binaries
2 parents eb89f68 + fc8205c commit 7a2c097

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/sign.builds

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
<OutDir>$(BinDir)</OutDir>
1616
</PropertyGroup>
1717

18+
<PropertyGroup>
19+
<SkipFileSigning Condition="'$(SkipFileSigning)' == ''" and "'$(BuildArch)' == 'arm64'">true</SkipFileSigning>
20+
</PropertyGroup>
21+
1822
<UsingTask AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" TaskName="ReadSigningRequired" />
1923

2024
<!-- apply the default signing certificates (defined in sign.targets) -->
@@ -26,7 +30,7 @@
2630
</ItemDefinitionGroup>
2731

2832
<!-- gather the list of binaries to sign with the default certificates -->
29-
<ItemGroup>
33+
<ItemGroup Condition="'$(SkipFileSigning)' != 'true'">
3034
<FilesToSign Include="$(BinDir)*.dll" Exclude="$(BinDir)*.ni.dll" />
3135
<FilesToSign Include="$(BinDir)*.exe" />
3236
</ItemGroup>
@@ -35,14 +39,14 @@
3539
for some reason the signing task incorrectly attemps to strong-name sign
3640
native images which causes the signing step to fail for obvious reasons.
3741
-->
38-
<ItemGroup>
42+
<ItemGroup Condition="'$(SkipFileSigning)' != 'true'">
3943
<FilesToSign Include="$(BinDir)*.ni.dll">
4044
<StrongName>None</StrongName>
4145
</FilesToSign>
4246
</ItemGroup>
4347

4448
<!-- populates item group FilesToSign with the list of files to sign -->
45-
<Target Name="GetFilesToSignItems" BeforeTargets="SignFiles">
49+
<Target Name="GetFilesToSignItems" BeforeTargets="SignFiles" Condition="'$(SkipFileSigning)' != 'true'">
4650
<!-- read all of the marker files and populate the FilesToSign item group -->
4751
<ItemGroup>
4852
<SignMarkerFile Include="$(OutDir)**\*.requires_signing" />
@@ -53,7 +57,7 @@
5357
</Target>
5458

5559
<!-- now that signing is done clean up any marker files -->
56-
<Target Name="CleanUpMarkerFiles" AfterTargets="SignFiles">
60+
<Target Name="CleanUpMarkerFiles" AfterTargets="SignFiles" Condition="'$(SkipFileSigning)' != 'true'">
5761
<!-- now that the files have been signed delete the marker files -->
5862
<Delete Files="@(SignMarkerFile)" />
5963
</Target>

0 commit comments

Comments
 (0)