summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-31 05:56:48 +0800
committerGitHub <noreply@github.com>2024-10-30 14:56:48 -0700
commit90bde47692075da5fcfe791f09fa2357c8fb6995 (patch)
tree3869cb3f09a48b9495b3789043a0f237aa1d0dc1
parent28f20f458c4f7f587556a1738d63b70e87c2b148 (diff)
Find slangc in more places in doc generation script (#5461)
Co-authored-by: Yong He <yonghe@outlook.com>
-rw-r--r--docs/build_reference.ps124
1 files changed, 17 insertions, 7 deletions
diff --git a/docs/build_reference.ps1 b/docs/build_reference.ps1
index 726fa804c..a29676819 100644
--- a/docs/build_reference.ps1
+++ b/docs/build_reference.ps1
@@ -33,13 +33,23 @@ Remove-Item -Path ".\stdlib-reference\attributes" -Recurse -Force
git describe --tags | Out-File -FilePath ".\stdlib-reference\_includes\version.inc" -Encoding ASCII
cd stdlib-reference
-& ../../build/Release/bin/slangc -compile-core-module -doc
-Move-Item -Path ".\toc.html" -Destination ".\_includes\stdlib-reference-toc.html" -Force
-git config user.email "bot@shader-slang.com"
-git config user.name "Stdlib Reference Bot"
-git add .
-git commit -m "Update the core module reference"
-git push
+$slangPaths = @(
+ "../../build/RelWithDebInfo/bin/slangc.exe",
+ "../../build/Release/bin/slangc.exe",
+ "../../build/Debug/bin/slangc.exe"
+)
+$slangExe = $slangPaths | Where-Object { Test-Path $_ } | Select-Object -First 1
+if ($slangExe) {
+ & $slangExe -compile-core-module -doc
+ Move-Item -Path ".\toc.html" -Destination ".\_includes\stdlib-reference-toc.html" -Force
+ git config user.email "bot@shader-slang.com"
+ git config user.name "Stdlib Reference Bot"
+ git add .
+ git commit -m "Update the core module reference"
+ git push
+} else {
+ Write-Error "Could not find slangc executable in RelWithDebInfo or Release directories"
+}
cd ../
# For local debugging only.