File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
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
+
1
15
# If stdlib-reference folder does not exist, clone from github repo
2
16
if (-not (Test-Path " .\stdlib-reference" )) {
3
17
git clone https:// github.com / shader- slang/ stdlib- reference/
4
18
}
5
19
else {
20
+ # If it already exist, just pull the latest changes.
6
21
cd stdlib- reference
7
22
git pull
8
23
cd ../
9
24
}
25
+ # Remove the old generated files.
10
26
Remove-Item - Path " .\stdlib-reference\global-decls" - Recurse - Force
11
27
Remove-Item - Path " .\stdlib-reference\interfaces" - Recurse - Force
12
28
Remove-Item - Path " .\stdlib-reference\types" - Recurse - Force
13
29
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.
14
32
git describe -- tags | Out-File - FilePath " .\stdlib-reference\_includes\version.inc" - Encoding ASCII
15
33
16
34
cd stdlib- reference
You can’t perform that action at this time.
0 commit comments