Skip to content

Commit 48ae8c2

Browse files
committed
Update comments.
1 parent 442d883 commit 48ae8c2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/build_reference.ps1

+18
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
1+
# This script uses `slangc` to generate stdlib reference documentation and push the updated
2+
# documents to shader-slang/stdlib-reference repository.
3+
# The stdlib-reference repository has github-pages setup so that the markdown files we generate
4+
# in this step will be rendered as html pages by Jekyll upon a commit to the repository.
5+
# So we we need to do here is to pull the stdlib-reference repository, regenerate the markdown files
6+
# and push the changes back to the repository.
7+
8+
# The generated markdown files will be located in three folders:
9+
# - ./global-decls
10+
# - ./interfaces
11+
# - ./types
12+
# In addition, slangc will generate a table of content file `toc.html` which will be copied to
13+
# ./_includes/stdlib-reference-toc.html for Jekyll for consume it correctly.
14+
115
# If stdlib-reference folder does not exist, clone from github repo
216
if (-not (Test-Path ".\stdlib-reference")) {
317
git clone https://github.com/shader-slang/stdlib-reference/
418
}
519
else {
20+
# If it already exist, just pull the latest changes.
621
cd stdlib-reference
722
git pull
823
cd ../
924
}
25+
# Remove the old generated files.
1026
Remove-Item -Path ".\stdlib-reference\global-decls" -Recurse -Force
1127
Remove-Item -Path ".\stdlib-reference\interfaces" -Recurse -Force
1228
Remove-Item -Path ".\stdlib-reference\types" -Recurse -Force
1329

30+
# Use git describe to produce a version string and write it to _includes/version.inc.
31+
# This file will be included by the stdlib-reference Jekyll template.
1432
git describe --tags | Out-File -FilePath ".\stdlib-reference\_includes\version.inc" -Encoding ASCII
1533

1634
cd stdlib-reference

0 commit comments

Comments
 (0)