-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print unique set of PDBs to a text file #4332
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,6 +142,28 @@ stages: | |
env: | ||
LIB: $(Build.SourcesDirectory) | ||
|
||
# In the "Publish symbols to SymWeb and MSDL" step, the symbols are automatically stripped in the API. | ||
# However, since WindowsAppSDK is public, we don't need to strip them. | ||
# So we need to send a list of pdbs to the symbols team that is not needed to be stripped | ||
# This task facilitates this. | ||
- task: PowerShell@2 | ||
name: ListUniquePDBs | ||
displayName: 'List Unique PDBs and write to pdbs.txt' | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
$pdbSet = @{} | ||
$inputPath = "$(Build.ArtifactStagingDirectory)\symbols" | ||
Get-ChildItem *.pdb -Path $inputPath -Recurse | foreach-object { | ||
$pdbSet[$_.Name] = $true | ||
} | ||
foreach ($value in $pdbSet.Keys) | ||
{ | ||
Write-Host $value | ||
} | ||
New-Item "$(ob_outputDirectory)\pdbs.txt" -Force | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is 'ob'? |
||
$pdbSet.Keys | Out-File "$(ob_outputDirectory)\pdbs.txt" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can replace lines 164-165 with the simpler
You can also control encoding if need be (see other Set-Content uses across the repo for examples) |
||
|
||
# Publishing symbols publicly requires making an API call to the service and is handled by PublishPublicSymbols.ps1 | ||
# in eng/common | ||
# See this page for more info: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're using hashset as a dynamically growable collection? Since you don't care about the value
$null
would be slightly prefereable to$true