GetFiles.ps1 770 B

123456789101112131415161718192021
  1. param (
  2. [switch] $Avalonia,
  3. [switch] $Published
  4. )
  5. $ErrorActionPreference = 'Stop'
  6. $telemetryKey = ${env:RoslynPadTelemetryKey};
  7. if ($null -eq $telemetryKey) {
  8. throw "Missing RoslynPadTelemetryKey environment variable"
  9. }
  10. $project = if ($Avalonia) { 'RoslynPad.Avalonia' } else { 'RoslynPad' }
  11. $path = if ($Published) { 'bin\Release\netcoreapp3.1\win-x64\publish' } else { 'bin\Release\netcoreapp3.1' }
  12. $rootPath = [IO.Path]::GetFullPath("$PSScriptRoot\..\src\$project\$path")
  13. $exclude = @();
  14. $files = get-childitem "$rootPath\*.*" -file | where { $exclude -notcontains $_.Name } | select -ExpandProperty FullName
  15. if (Test-Path "$rootPath\runtimes") {
  16. $files += get-childitem "$rootPath\runtimes\*.*" -recurse -file | select -ExpandProperty FullName
  17. }