mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-31 01:37:03 +08:00
fix doc generation and jazzy version
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
This commit is contained in:
parent
f72c4688f8
commit
85c553167e
1
.SourceKitten
Submodule
1
.SourceKitten
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 9c254b5be7248f406bcafd36d670614b7f067632
|
@ -18,11 +18,10 @@ RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools
|
||||
RUN apt-get update && apt-get install -y zlib1g-dev
|
||||
|
||||
# ruby and jazzy for docs generation
|
||||
RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev build-essential
|
||||
# switch off 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 apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev build-essential ; 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
|
||||
|
@ -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 --module-name $module > "$root_path/.build/sourcekitten/$module.json"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user