|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -set -e |
4 | | -set -x |
5 | | - |
6 | | -rm -rf html |
7 | | -mkdir -p html |
8 | | - |
9 | | -rm -rf .build |
10 | | -mkdir -p .build/symbol-graphs |
11 | | - |
12 | | -# Lindenmayer.symbols.json LindenmayerViews.symbols.json [email protected] |
13 | | -# [email protected] SceneKitDebugTools.symbols.json Squirrel3.symbols.json |
14 | | - |
15 | | - |
16 | | -swift build --target Lindenmayer \ |
17 | | ---target LindenmayerViews \ |
18 | | --Xswiftc -emit-symbol-graph \ |
19 | | --Xswiftc -emit-symbol-graph-dir -Xswiftc .build/symbol-graphs |
20 | | - |
21 | | -# cull the non-Lindenmayer specific builds from the symbol graph files |
22 | | -rm -f .build/symbol-graphs/SceneKitDebug* .build/symbol-graphs/Squirrel3* |
23 | | - |
| 3 | +echo "Make sure you've rebased over the current HEAD branch:" |
| 4 | +echo "git rebase -i origin/main docs" |
| 5 | + |
| 6 | +set -e # exit on a non-zero return code from a command |
| 7 | +set -x # print a trace of commands as they execute |
| 8 | + |
| 9 | +#rm -rf .build |
| 10 | +#mkdir -p .build/symbol-graphs |
| 11 | +# |
| 12 | +#$(xcrun --find swift) build --target Lindenmayer --target LindenmayerViews \ |
| 13 | +# -Xswiftc -emit-symbol-graph \ |
| 14 | +# -Xswiftc -emit-symbol-graph-dir -Xswiftc .build/symbol-graphs |
| 15 | +#rm -f .build/symbol-graphs/SceneKitDebug* .build/symbol-graphs/Squirrel3* |
| 16 | + |
| 17 | +# Enables deterministic output |
| 18 | +# - useful when you're committing the results to host on github pages |
24 | 19 | export DOCC_JSON_PRETTYPRINT=YES |
25 | 20 |
|
26 | | -xcrun docc convert Sources/Lindenmayer/Lindenmayer.docc \ |
27 | | ---enable-inherited-docs \ |
28 | | ---output-path Lindenmayer.doccarchive \ |
29 | | ---fallback-display-name Lindenmayer \ |
30 | | ---fallback-bundle-identifier com.github.heckj.Lindenmayer \ |
31 | | ---fallback-bundle-version 0.1.0 \ |
32 | | ---additional-symbol-graph-dir .build/symbol-graphs |
| 21 | +#xcrun docc convert Sources/Lindenmayer/Lindenmayer.docc \ |
| 22 | +#--enable-inherited-docs \ |
| 23 | +#--output-path Lindenmayer.doccarchive \ |
| 24 | +#--fallback-display-name Lindenmayer \ |
| 25 | +#--fallback-bundle-identifier com.github.heckj.Lindenmayer \ |
| 26 | +#--fallback-bundle-version 0.1.0 \ |
| 27 | +#--additional-symbol-graph-dir .build/symbol-graphs |
33 | 28 |
|
34 | 29 | #--transform-for-static-hosting \ |
35 | 30 | #--hosting-base-path '/' \ |
36 | 31 | #--emit-digest |
| 32 | + |
| 33 | + |
| 34 | +# Swift package plugin for hosted content: |
| 35 | +# |
| 36 | + $(xcrun --find swift) package \ |
| 37 | + --allow-writing-to-directory ./docs \ |
| 38 | + generate-documentation \ |
| 39 | + --fallback-bundle-identifier com.github.heckj.Lindenmayer \ |
| 40 | + --fallback-bundle-version 0.7.2 \ |
| 41 | + --target Lindenmayer \ |
| 42 | + --target LindenmayerViews \ |
| 43 | + --output-path ./docs \ |
| 44 | + --emit-digest \ |
| 45 | + --disable-indexing \ |
| 46 | + --transform-for-static-hosting \ |
| 47 | + --hosting-base-path 'Lindenmayer' |
| 48 | + |
| 49 | +# Generate a list of all the identifiers to assist in DocC curation |
| 50 | +# |
| 51 | + |
| 52 | +cat docs/linkable-entities.json | jq '.[].referenceURL' -r > all_identifiers.txt |
| 53 | +sort all_identifiers.txt \ |
| 54 | + | sed -e 's/doc:\/\/com\.github\.heckj\.Lindenmayer\/documentation\///g' \ |
| 55 | + | sed -e 's/^/- ``/g' \ |
| 56 | + | sed -e 's/$/``/g' > all_symbols.txt |
| 57 | + |
| 58 | +echo "Page will be available at https://swiftviz.github.io/Lindenmayer/documentation/Lindenmayer/" |
0 commit comments