diff --git a/docker/Dockerfile b/docker/Dockerfile index 3e138428e..6395405c1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,9 +18,9 @@ RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools # ruby and jazzy for docs generation RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev build-essential -# switch of gem docs building -RUN if [ "${ubuntu_version}" = "focal" ] ; then echo "gem: --no-document" > ~/.gemrc ; fi -RUN if [ "${ubuntu_version}" = "focal" ] ; then gem install jazzy ; fi +# jazzy no longer works on xenial as ruby is too old. +RUN if [ "${ubuntu_version}" = "focal" ] ; then echo "gem: --no-document" > ~/.gemrc; fi +RUN if [ "${ubuntu_version}" = "focal" ] ; then gem install jazzy; fi # tools RUN mkdir -p $HOME/.tools diff --git a/scripts/generate_docs.sh b/scripts/generate_docs.sh index bfdc40f70..82da814d3 100755 --- a/scripts/generate_docs.sh +++ b/scripts/generate_docs.sh @@ -26,7 +26,8 @@ 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 @@ -36,10 +37,9 @@ if [[ "$(uname -s)" == "Linux" ]]; then 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 --module-name $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