-
Notifications
You must be signed in to change notification settings - Fork 82
invoking docc from toolchains #863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,30 +47,13 @@ declare -r build_path_linux="$build_path/" | |
| declare -r docc_source_path="$root_path/.build/swift-docc" | ||
| declare -r docc_render_source_path="$root_path/.build/swift-docc-render" | ||
|
|
||
| # Prepare and build docc | ||
| if [[ ! -d "$docc_source_path" ]]; then | ||
| git clone https://github.com/apple/swift-docc.git "$docc_source_path" | ||
| cd $docc_source_path | ||
|
|
||
| if [[ ! -d "$docc_source_path/$build_path" ]]; then | ||
| swift build -c release | ||
| fi | ||
| else | ||
| echo "Assuming docc is built..." | ||
| fi | ||
|
|
||
|
|
||
| if [[ ! -d "$docc_render_source_path" ]]; then | ||
| git clone https://github.com/apple/swift-docc-render.git "$docc_render_source_path" | ||
| cd $docc_render_source_path | ||
|
|
||
| npm install | ||
| npm run build | ||
| else | ||
| echo "Assuming docc-render is built..." | ||
| # invoking docc from toolchain | ||
| if [-z ${TOOLCHAIN+x} ]; then | ||
| echo "TOOLCHAIN is unset"; exit(1); | ||
| fi | ||
| export DOCC_HTML_DIR=${TOOLCHAIN}/usr/bin/docc | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DOCC_HTML_DIR should point to the docc-render dist dir or in the toolchain it is located at /usr/share/docc/render |
||
|
|
||
| export DOCC_HTML_DIR=$docc_render_source_path/dist | ||
| $TOOLCHAIN/usr/bin/docc | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Calling docc seems useless here for me. What we want is to export the env DOCC_HTML_DIR so that we can use it later when call docc in preview_docc.sh |
||
|
|
||
| # Build documentation | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gives an error on my machine with zsh.
line 52: syntax error near unexpected token `1'