Skip to content

Commit adf4165

Browse files
committed
Use the DocC binary that ships with Xcode
Early on, TSPL depended on DocC features that had landed on that repository's mainline development branch, but were too new to appear in Xcode's DocC. That hasn't been the case for a while now. Removing the need to locally compile DocC speeds up and simplifies the build process.
1 parent 730309b commit adf4165

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

bin/publish-book

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@
99
# See https://swift.org/CONTRIBUTORS.txt for Swift project authors
1010

1111
# Prepares a version of the book suitable for publication on swift.org.
12-
#
13-
# To use top-of-tree DocC, clone the following repositories:
14-
#
15-
# https://github.com/apple/swift-docc
16-
# https://github.com/apple/swift-docc-render
17-
#
18-
# Then set environment variables to paths in their working directories,
19-
# like the following, before running this script:
20-
#
21-
# PATH=~/git/DocC/.build/arm64-apple-macosx/debug:$PATH
22-
# DOCC_HTML_DIR=~/git/DocC-Renderer/dist/
2312

2413
set -eux
2514

@@ -36,7 +25,7 @@ cd "$(git rev-parse --show-toplevel)"
3625
# The published version of the book gets the swift.org header.
3726
cp -n TSPL.docc/header-publish.html TSPL.docc/header.html
3827

39-
docc convert \
28+
xcrun docc convert \
4029
--experimental-enable-custom-templates \
4130
--hosting-base-path swift-book \
4231
--output-path "$output" \

bin/update-book-preview

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,8 @@
1414
# This script should be run by someone with commit access to the 'gh-pages' branch
1515
# at a regular frequency so that the documentation content on the GitHub Pages site
1616
# is up-to-date with the content in this repo.
17-
#
18-
# To use top-of-tree DocC, clone the following repositories:
19-
#
20-
# https://github.com/apple/swift-docc
21-
# https://github.com/apple/swift-docc-render
22-
#
23-
# Then set environment variables to paths in their working directories,
24-
# like the following, before running this script:
25-
#
26-
# PATH=~/git/DocC/.build/arm64-apple-macosx/debug:$PATH
27-
# DOCC_HTML_DIR=~/git/DocC-Renderer/dist/
2817

29-
set -eu
18+
set -eux
3019

3120
REMOTE=${1:-origin}
3221
CURRENT_COMMIT_HASH="$(git rev-parse --short HEAD)"
@@ -46,7 +35,7 @@ export DOCC_JSON_PRETTYPRINT="YES"
4635
cp -n TSPL.docc/header-staging.html TSPL.docc/header.html
4736

4837
# Build documentation, writing output in the gh-pages/docs subdirectory.
49-
docc convert \
38+
xcrun docc convert \
5039
--experimental-enable-custom-templates \
5140
--hosting-base-path swift-book \
5241
--output-path "./gh-pages/docs" \

0 commit comments

Comments
 (0)