Update dependencies from https://github.com/dotnet/arcade build 20200630.3 (#7949)
Microsoft.DotNet.Arcade.Sdk From Version 5.0.0-beta.20316.1 -> To Version 5.0.0-beta.20330.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
This commit is contained in:
parent
4938de9293
commit
1a87e57f2d
13 changed files with 332 additions and 27 deletions
|
@ -24,7 +24,7 @@ $CountMissingSymbols = {
|
|||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
Write-PipelineTaskError "Input file does not exist: $PackagePath"
|
||||
return 1
|
||||
return -2
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for symbols
|
||||
|
@ -44,7 +44,10 @@ $CountMissingSymbols = {
|
|||
catch {
|
||||
Write-Host "Something went wrong extracting $PackagePath"
|
||||
Write-Host $_
|
||||
return -1
|
||||
return [pscustomobject]@{
|
||||
result = -1
|
||||
packagePath = $PackagePath
|
||||
}
|
||||
}
|
||||
|
||||
Get-ChildItem -Recurse $ExtractPath |
|
||||
|
@ -146,7 +149,24 @@ $CountMissingSymbols = {
|
|||
|
||||
Pop-Location
|
||||
|
||||
return $MissingSymbols
|
||||
return [pscustomobject]@{
|
||||
result = $MissingSymbols
|
||||
packagePath = $PackagePath
|
||||
}
|
||||
}
|
||||
|
||||
function CheckJobResult(
|
||||
$result,
|
||||
$packagePath,
|
||||
[ref]$DupedSymbols,
|
||||
[ref]$TotalFailures) {
|
||||
if ($result -eq '-1') {
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$packagePath has duplicated symbol files"
|
||||
$DupedSymbols.Value++
|
||||
}
|
||||
elseif ($jobResult.result -ne '0') {
|
||||
$TotalFailures.Value++
|
||||
}
|
||||
}
|
||||
|
||||
function CheckSymbolsAvailable {
|
||||
|
@ -155,6 +175,7 @@ function CheckSymbolsAvailable {
|
|||
}
|
||||
|
||||
$TotalFailures = 0
|
||||
$DupedSymbols = 0
|
||||
|
||||
Get-ChildItem "$InputPath\*.nupkg" |
|
||||
ForEach-Object {
|
||||
|
@ -190,9 +211,7 @@ function CheckSymbolsAvailable {
|
|||
|
||||
foreach ($Job in @(Get-Job -State 'Completed')) {
|
||||
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
|
||||
if ($jobResult -ne '0') {
|
||||
$TotalFailures++
|
||||
}
|
||||
CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures)
|
||||
Remove-Job -Id $Job.Id
|
||||
}
|
||||
Write-Host
|
||||
|
@ -200,14 +219,18 @@ function CheckSymbolsAvailable {
|
|||
|
||||
foreach ($Job in @(Get-Job)) {
|
||||
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
|
||||
|
||||
if ($jobResult -ne '0') {
|
||||
$TotalFailures++
|
||||
}
|
||||
CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures)
|
||||
}
|
||||
|
||||
if ($TotalFailures -gt 0) {
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures packages"
|
||||
if ($TotalFailures -gt 0 -or $DupedSymbols -gt 0) {
|
||||
if ($TotalFailures -gt 0) {
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures packages"
|
||||
}
|
||||
|
||||
if ($DupedSymbols -gt 0) {
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols packages had duplicated symbol files"
|
||||
}
|
||||
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue