123456789101112131415161718192021222324252627282930313233 |
- #!/usr/bin/env pwsh
- <
- .SYNOPSIS
- Builds the documentation as HTML.
- $scriptDir = Split-Path $PSCommandPath -Parent
- $projectDir = (Get-Item $scriptDir).Parent
- $docsDir = Join-Path -Path $projectDir -ChildPath "docs"
- $docsBuildDir = Join-Path -Path $docsDir -ChildPath "_build"
- $ExitCode = 0
- sphinx-build -M clean $docsDir $docsBuildDir
- sphinx-build -M html $docsDir $docsBuildDir -W
- $ExitCode = $LastExitCode
- if ($ExitCode -eq 0) {
- Write-Host "Docs have been built! 📜" -ForegroundColor Green
- }
- else {
-
- Write-Host "##vso[task.LogIssue type=error;]There were warnings or errors building the docs."
- }
- exit $ExitCode
|