2
0

build.ps1 600 B

12345678910111213141516171819202122232425
  1. # Builds the Terminal.gui API documentation using docfx
  2. # Get the script directory and derive the docfx directory from it
  3. $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
  4. $docfxDir = Split-Path -Parent $scriptDir
  5. $prevPwd = $PWD
  6. Set-Location $docfxDir
  7. try {
  8. Write-Host "Working directory: $(Get-Location)"
  9. dotnet tool update -g docfx
  10. # Force delete metadata
  11. Remove-Item ./api -Recurse -Force -ErrorAction SilentlyContinue
  12. $env:DOCFX_SOURCE_BRANCH_NAME="v2_develop"
  13. docfx --serve
  14. }
  15. finally {
  16. # Restore the previous location
  17. $prevPwd | Set-Location
  18. }