From 5db2bc495a05be4f00270506e4a0a0e4f2fbdc71 Mon Sep 17 00:00:00 2001 From: tomer doron Date: Thu, 16 Dec 2021 15:18:06 -0800 Subject: [PATCH] update doc generation script (#213) motivation: source-kitten has changed how its invoked changes: * invoke source-kitten with the correct flags * make location of source-kitten source checkout more robust --- scripts/generate_docs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_docs.sh b/scripts/generate_docs.sh index efdccfb..21996b8 100755 --- a/scripts/generate_docs.sh +++ b/scripts/generate_docs.sh @@ -26,20 +26,20 @@ if [[ "$(uname -s)" == "Linux" ]]; then swift build fi # setup source-kitten if required - source_kitten_source_path="$root_path/.SourceKitten" + mkdir -p "$root_path/.build/sourcekitten" + source_kitten_source_path="$root_path/.build/sourcekitten/source" if [[ ! -d "$source_kitten_source_path" ]]; then git clone https://github.com/jpsim/SourceKitten.git "$source_kitten_source_path" fi - source_kitten_path="$source_kitten_source_path/.build/x86_64-unknown-linux/debug" + source_kitten_path="$source_kitten_source_path/.build/debug" if [[ ! -d "$source_kitten_path" ]]; then rm -rf "$source_kitten_source_path/.swift-version" cd "$source_kitten_source_path" && swift build && cd "$root_path" fi # generate - mkdir -p "$root_path/.build/sourcekitten" for module in "${modules[@]}"; do if [[ ! -f "$root_path/.build/sourcekitten/$module.json" ]]; then - "$source_kitten_path/sourcekitten" doc --spm-module $module > "$root_path/.build/sourcekitten/$module.json" + "$source_kitten_path/sourcekitten" doc --spm --module-name $module > "$root_path/.build/sourcekitten/$module.json" fi done fi