Closed satroschenko closed 6 months ago
Well, jazzy does run xcodebuild
under the covers to figure out what to document so I guess I can understand where the Xcode error message here is coming from.
You could maybe explore having jazzy use a different DerivedData
directory than your main build with --build-tool-arguments
and -derivedDataPath
but it's kind of a shame to build it again; or try using jazzy in symbol graph mode against your swiftmodule?
Thanks a lot. Yes, the first variant with different DerivedData
works with some improvements.
Initially I added new Build Phase
. It runs jazzy
. Jazzy
run new build. New build runs jazzy
again and I had infinite recursion.
Had to add some checking for it.
As result I have following script:
#!/bin/bash
# Check is jazzy already running to remove recursion.
if [ -z $(printenv SKIP_JAZZY) ]; then
echo "jazzy starts..."
else
echo "Jazzy is already running. Skip this step."
exit 0
fi
export SKIP_JAZZY=1
TEMP_DERIVED_DIR=$(mktemp -d)
# Clean temp dir when script exits.
trap "rm -rf $TEMP_DERIVED_DIR" EXIT
jazzy --xcodebuild-arguments -derivedDataPath,$TEMP_DERIVED_DIR
infinite recursion
Oh haha, should have seen that coming! Glad you got it working.
If I add a new
Run script phase
in XCode to run jazzy I get an error:Is it possible to run jazzy in this way?