Fix doc generation and jazzy version (#1950)

* Fix doc generation and jazzy version

From: https://github.com/apple/swift-nio-extras/pull/141

motivation: fix ci

changes:
* only install ruby and jazzy on focal since jazzy id not supported onlder versions of ubuntu
* fix doc generations script adjusting it to latest source-kittent syntax

* Always install ruby: we need it for generating a test manifest
This commit is contained in:
George Barnett 2021-09-02 18:08:04 +01:00 committed by GitHub
parent d8348adc55
commit 2f189a39f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -18,10 +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 echo "gem: --no-document" > ~/.gemrc
# jazzy no longer works on xenial as ruby is too old.
RUN if [ "${ubuntu_version}" != "xenial" ] ; then gem install jazzy; fi
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

View File

@ -40,7 +40,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 --module-name $module > "$root_path/.build/sourcekitten/$module.json"
fi
done
fi