forked from csoltenborn/GoogleTestAdapter
-
Notifications
You must be signed in to change notification settings - Fork 43
/
FilesToScan.ps1
21 lines (18 loc) · 1.01 KB
/
FilesToScan.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
param (
[string]$buildArtifactStagingDirectory,
[string]$directoryToSearch
)
$filesToScan = @("GoogleTestAdapter.Common.dll", "GoogleTestAdapter.Common.Dynamic.dll", "GoogleTestAdapter.Core.dll", "GoogleTestAdapter.DiaResolver.dll", "GoogleTestAdapter.TestAdapter.dll", "GoogleTestAdapter.VsPackage.TAfGT.dll", "NewProjectWizard.dll")
$FilesToScanDrop = "$buildArtifactStagingDirectory/FilesToScanDrop"
if (!(Test-Path -Path $FilesToScanDrop)) {
New-Item -ItemType Directory -Path $FilesToScanDrop | Out-Null
}
foreach ($file in $filesToScan) {
# Search in output directory for files we want to scan, but exclude any arm binaries.
$sourcePaths = Get-ChildItem -Path $directoryToSearch -Recurse -Include $file -File | Where-Object { $_.DirectoryName -notmatch '\\arm\\|\\arm64\\' }
foreach ($sourcePath in $sourcePaths) {
$destinationPath = Join-Path $FilesToScanDrop $sourcePath.Name
Copy-Item $sourcePath.FullName $destinationPath
Write-Host "Found File to Scan: $sourcePath"
}
}