Lumi/companion/scripts/verify-song-overlay.ps1
2026-07-29 23:41:34 +02:00

21 lines
874 B
PowerShell

$ErrorActionPreference = 'Stop'
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..\..')).Path
$sdk = Join-Path $env:LOCALAPPDATA "Lumi\dotnet-sdk-10\dotnet.exe"
$dotnet = if (Test-Path $sdk) { $sdk } else { (Get-Command dotnet.exe -ErrorAction Stop).Source }
$node = (Get-Command node.exe -ErrorAction Stop).Source
Push-Location $repoRoot
try {
Write-Host 'Building Lumi Companion and all registered Companion plugins...'
& $dotnet build 'companion/Lumi.Companion.sln' -c Release
if ($LASTEXITCODE) { throw 'Lumi Companion build failed.' }
Write-Host 'Verifying the existing Lumi Song Overlay server plugin...'
& $node 'plugins/now_playing/tests/verify.js'
if ($LASTEXITCODE) { throw 'Song Overlay server verification failed.' }
Write-Host 'Song Overlay Companion verification passed.' -ForegroundColor Green
}
finally {
Pop-Location
}