forked from etas/vs-boost-unit-test-adapter
-
Notifications
You must be signed in to change notification settings - Fork 20
/
FilesToScan.ps1
21 lines (18 loc) · 957 Bytes
/
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 = @("Antlr.DOT.dll", "BoostTestAdapter.dll", "BoostTestPackage.dll", "BoostTestPlugin.dll", "BoostTestShared.dll", "ThirdPartySigning.dll", "VisualStudioAdapter.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"
}
}