Skip to content

Commit 0622ab4

Browse files
authored
Fix build (#4325)
1 parent be4be13 commit 0622ab4

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

scripts/verify-sign.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ function Verify-Assemblies
5454
if ($signature.SignerCertificate.Subject -eq "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US") {
5555
Write-Debug "Valid ($($signature.SignerCertificate.Thumbprint)): $Path"
5656
}
57+
elseif ($signature.SignerCertificate.Subject -eq "CN=.NET, O=Microsoft Corporation, L=Redmond, S=Washington, C=US") {
58+
Write-Debug "Valid ($($signature.SignerCertificate.Thumbprint)): $Path"
59+
}
5760
elseif ($signature.SignerCertificate.Subject -eq "CN=Microsoft 3rd Party Application Component, O=Microsoft Corporation, L=Redmond, S=Washington, C=US") {
5861
Write-Debug "Valid ($($signature.SignerCertificate.Thumbprint)): $Path [3rd Party]"
5962
}
@@ -78,6 +81,10 @@ function Verify-Assemblies
7881
elseif ($signature.SignerCertificate.Thumbprint -eq "62009AAABDAE749FD47D19150958329BF6FF4B34") {
7982
Write-Debug "Valid ($($signature.SignerCertificate.Thumbprint)): $Path [Prod Signed]"
8083
}
84+
# For some dlls sign certificate is different signature. Skip such binaries.
85+
elseif ($signature.SignerCertificate.Thumbprint -eq "F9A36937C16D0A69A43981DACB6B5686FAD84543") {
86+
Write-Debug "Valid ($($signature.SignerCertificate.Thumbprint)): $Path [Prod Signed]"
87+
}
8188
# Microsoft 3rd Party Authenticode Signature
8289
elseif ($signature.SignerCertificate.Thumbprint -eq "899FA016DEE8E665FF2A315A1151C43FB96C430B") {
8390
Write-Debug "Valid ($($signature.SignerCertificate.Thumbprint)): $Path [Prod Signed]"
@@ -94,6 +101,10 @@ function Verify-Assemblies
94101
elseif ($signature.SignerCertificate.Thumbprint -eq "81C25099511180D15B858DC2B7EC4C057B1CE4BF") {
95102
Write-Debug "Valid ($($signature.SignerCertificate.Thumbprint)): $Path [Prod Signed]"
96103
}
104+
# .NET Foundation, Newtonsoft.Json.dll 13.0.1
105+
elseif ($signature.SignerCertificate.Thumbprint -eq "4CFB89FAA49539A58968D81960B3C1258E8F6A34") {
106+
Write-Debug "Valid ($($signature.SignerCertificate.Thumbprint)): $Path [.NET Foundation Signed]"
107+
}
97108
else {
98109
Write-FailLog "Invalid ($($signature.SignerCertificate.Thumbprint)). File: $Path. [$($signature.SignerCertificate.Subject)]"
99110
}

scripts/vsts-prebuild.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ param (
66
[Parameter(Mandatory)]
77
[string] $IsRtmBuild,
88
[Parameter(Mandatory)]
9-
$Branch
9+
$Branch,
10+
[Parameter(Mandatory)]
11+
[string] $ForcePreviewOnRelBranch
1012
)
1113

1214
$TP_ROOT_DIR = (Get-Item (Split-Path $MyInvocation.MyCommand.Path)).Parent.FullName
@@ -17,7 +19,7 @@ $buildPrefix = $TpVersion.Trim()
1719

1820
if ($IsRtmBuild.ToLower() -eq "false")
1921
{
20-
if ($null -ne $Branch -and $Branch -like "refs/heads/rel/*")
22+
if ($null -ne $Branch -and $Branch -like "refs/heads/rel/*" -and "false" -eq $ForcePreviewOnRelBranch)
2123
{
2224
$BuildSuffix = $BuildSuffix -replace "preview", "release"
2325
}

0 commit comments

Comments
 (0)