29 lines
770 B
PowerShell
29 lines
770 B
PowerShell
[CmdletBinding()]
|
||
param()
|
||
|
||
$ErrorActionPreference = 'Stop'
|
||
$repositoryRoot = Split-Path -Parent $PSScriptRoot
|
||
$doxygen = Get-Command doxygen -ErrorAction SilentlyContinue
|
||
|
||
if (-not $doxygen) {
|
||
throw 'Doxygen не найден в PATH. Установите Doxygen и повторите запуск.'
|
||
}
|
||
|
||
Push-Location $repositoryRoot
|
||
try {
|
||
& $doxygen.Source Doxyfile
|
||
if ($LASTEXITCODE -ne 0) {
|
||
throw "Doxygen завершился с кодом $LASTEXITCODE."
|
||
}
|
||
}
|
||
finally {
|
||
Pop-Location
|
||
}
|
||
|
||
$indexPath = Join-Path $repositoryRoot '.codex-build\doxygen\html\index.html'
|
||
if (-not (Test-Path -LiteralPath $indexPath)) {
|
||
throw "Doxygen не создал ожидаемый файл: $indexPath"
|
||
}
|
||
|
||
Write-Host "[DONE] Doxygen HTML: $indexPath"
|