From c9683a209e3591079eee5f3cb5152f7b2d862dc6 Mon Sep 17 00:00:00 2001 From: Cassius Pacheco Date: Mon, 28 Nov 2022 12:16:12 +1100 Subject: [PATCH] docs: fix DocC generation The docs were not being generated correctly for every new version. They are not generated and parsed as expected. --- .gitignore | 3 ++- generate-static-docs.sh | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2a88862..e47a8c9 100644 --- a/.gitignore +++ b/.gitignore @@ -92,4 +92,5 @@ iOSInjectionProject/ .DS_Store docs/ -*.doccarchive \ No newline at end of file +*.doccarchive +docs_build/ \ No newline at end of file diff --git a/generate-static-docs.sh b/generate-static-docs.sh index 1270370..4f558fd 100755 --- a/generate-static-docs.sh +++ b/generate-static-docs.sh @@ -22,5 +22,11 @@ if [[ "$VERSION" == *"."* ]]; then exit 1 fi -$(xcrun --find docc) process-archive transform-for-static-hosting ImmutableXCore.doccarchive --output-path docs --hosting-base-path /sdk-references/core-sdk-swift/$VERSION +echo "Building docs..." +xcodebuild docbuild -scheme ImmutableXCore -destination generic/platform=iOS -derivedDataPath docs_build +doccarchive=($(find docs_build -type d -name "ImmutableXCore.doccarchive")) +echo "doccarchive at: /$doccarchive" +echo "--------" +echo "Processing Static docs..." +$(xcrun --find docc) process-archive transform-for-static-hosting $doccarchive --output-path docs --hosting-base-path /sdk-references/core-sdk-swift/$VERSION echo "Generated under /docs using hosting-base-path: /sdk-references/core-sdk-swift/$VERSION" \ No newline at end of file