From c1c3645c8fbc0d475794562b381efa27d7e4a09f Mon Sep 17 00:00:00 2001 From: bruno-f-cruz <7049351+bruno-f-cruz@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:07:47 -0700 Subject: [PATCH] Fix docs building script to be agnostic to dotnet target. --- docs/build.ps1 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/build.ps1 b/docs/build.ps1 index 3fee39e..5c90776 100644 --- a/docs/build.ps1 +++ b/docs/build.ps1 @@ -12,15 +12,18 @@ foreach ($file in $files) # Find assemblies to build workflows $baseDir = (Get-Item -Path "..\src" -Verbose).FullName $folderPaths = Get-ChildItem -Path $baseDir -Directory -$sufix = "bin\Release\net472" +$suffix = "bin\Release\net*" $packages = @() # find package assemblies foreach ($folderPath in $folderPaths) { - $snlPath = Join-Path -Path $folderPath.FullName -ChildPath ($folderPath.Name + ".sln") - if (Test-Path -Path $snlPath) { - $libPath = Join-Path -Path $folderPath.FullName -ChildPath $sufix - $packages += $libPath + $slnPath = Join-Path -Path $folderPath.FullName -ChildPath ($folderPath.Name + ".sln") + if (Test-Path -Path $slnPath) { + $libPath = Join-Path -Path $folderPath.FullName -ChildPath $suffix + $matchingFolders = Get-ChildItem -Path $libPath -Directory | Where-Object { $_.Name -match "^net\d+" } + if ($matchingFolders) { + $packages += $matchingFolders.FullName + } } }