21 lines
1.2 KiB
PowerShell
21 lines
1.2 KiB
PowerShell
[CmdletBinding()]
|
|
param(
|
|
[Parameter(Mandatory)][string]$Workbook,
|
|
[string]$Status = (Join-Path $PSScriptRoot '../examples/status.example.json'),
|
|
[string]$OutputDirectory = (Join-Path $PSScriptRoot '../output'),
|
|
[string]$Python = 'python'
|
|
)
|
|
$ErrorActionPreference = 'Stop'
|
|
# Offline rendering only. Collect real evidence separately with explicit source flags.
|
|
$pythonCommand = Get-Command $Python -ErrorAction Stop
|
|
$Html = Join-Path $OutputDirectory 'automations-calendar.html'
|
|
$Results = Join-Path $OutputDirectory 'automations-results.html'
|
|
& $pythonCommand.Source (Join-Path $PSScriptRoot 'build_automations_calendar.py') --workbook $Workbook --html $Html --status $Status
|
|
if ($LASTEXITCODE -ne 0) { throw "Calendar generation failed: $LASTEXITCODE" }
|
|
& $pythonCommand.Source (Join-Path $PSScriptRoot 'build_automation_results.py') --workbook $Workbook --status $Status --output $Results
|
|
if ($LASTEXITCODE -ne 0) { throw "Results generation failed: $LASTEXITCODE" }
|
|
foreach ($path in @($Html, $Results)) {
|
|
if (-not (Test-Path -LiteralPath $path) -or (Get-Item -LiteralPath $path).Length -eq 0) { throw "Missing or empty dashboard: $path" }
|
|
}
|
|
Write-Output 'Verified calendar and results dashboard outputs.'
|