fix doc generation setup (#336)

This commit is contained in:
tomer doron
2021-01-24 15:12:34 -08:00
committed by GitHub
parent 9671de72fd
commit bbebce3739
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -4,3 +4,4 @@ Package.resolved
DerivedData
.DS_Store
.swiftpm/
.SourceKitten
+2 -2
View File
@@ -30,7 +30,7 @@ if [[ "$(uname -s)" == "Linux" ]]; then
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"
@@ -39,7 +39,7 @@ if [[ "$(uname -s)" == "Linux" ]]; then
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