Skip to content

Commit

Permalink
Default to find device.yml in repository root
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Nov 11, 2024
1 parent 62f24b1 commit 69b9c5a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions docs/build.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# Build device tables
$files = Get-ChildItem .\harp_devices_src\harp.device.*\software\bonsai\device.yml
$files_root = Get-ChildItem .\harp_devices_src\harp.device.*\device.yml
$files += $files_root
$files = Get-ChildItem .\harp_devices_src\harp.device.*\device.yml

foreach ($file in $files)
{
Write-Output "Generating schema tables for $file..."
$readmePath = (Get-Item $file).Directory.Parent.Parent.FullName + "\README.md"
if (-Not (Test-Path $readmePath)) {
$readmePath = (Get-Item $file).Directory.FullName + "\README.md"
}
$readmePath = (Get-Item $file).Directory.FullName + "\README.md"
$readmePath = ("." + (Resolve-Path -Relative $readmePath))
$readmePath = $readmePath.Replace("\", "/")
dotnet run --project .\harp_devices_src\harp.schemaprocessor $file .\harp_devices_spec $readmePath
Expand Down

0 comments on commit 69b9c5a

Please sign in to comment.