Skip to content

Commit 7f1f87e

Browse files
committed
Update doc generation script
Motivation: The docs haven't been generated for a while. See also: apple/swift-nio#2013 Modifications: - Pass `--spm` flag to sourcekitten - Update source location of sourcekitten Result: Docs build.
1 parent 6e94a7b commit 7f1f87e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/generate_docs.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ if [[ "$(uname -s)" == "Linux" ]]; then
2626
swift build
2727
fi
2828
# setup source-kitten if required
29-
source_kitten_source_path="$root_path/.SourceKitten"
29+
mkdir -p "$root_path/.build/sourcekitten"
30+
source_kitten_source_path="$root_path/.build/sourcekitten/source"
3031
if [[ ! -d "$source_kitten_source_path" ]]; then
3132
git clone https://github.com/jpsim/SourceKitten.git "$source_kitten_source_path"
3233
fi
33-
source_kitten_path="$source_kitten_source_path/.build/x86_64-unknown-linux/debug"
34+
source_kitten_path="$source_kitten_source_path/.build/debug"
3435
if [[ ! -d "$source_kitten_path" ]]; then
3536
rm -rf "$source_kitten_source_path/.swift-version"
3637
cd "$source_kitten_source_path" && swift build && cd "$root_path"
3738
fi
3839
# generate
39-
mkdir -p "$root_path/.build/sourcekitten"
4040
for module in "${modules[@]}"; do
4141
if [[ ! -f "$root_path/.build/sourcekitten/$module.json" ]]; then
42-
"$source_kitten_path/sourcekitten" doc --module-name $module > "$root_path/.build/sourcekitten/$module.json"
42+
"$source_kitten_path/sourcekitten" doc --spm --module-name $module > "$root_path/.build/sourcekitten/$module.json"
4343
fi
4444
done
4545
fi

0 commit comments

Comments
 (0)