Update doc generation script (#100)
motivation: source-kitten has changed how its invoked changes: * update docker file to install jazzy correctly * invoke source-kitten with the correct flags * make location of source-kitten source checkout more robust
This commit is contained in:
parent
9c53b7a758
commit
172d71fdc3
|
@ -20,8 +20,10 @@ RUN apt-get update && apt-get install -y wget
|
||||||
RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools curl jq python2.7 # used by integration tests
|
RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools curl jq python2.7 # used by integration tests
|
||||||
|
|
||||||
# ruby and jazzy for docs generation
|
# ruby and jazzy for docs generation
|
||||||
RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev
|
RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev build-essential
|
||||||
RUN if [ "${ubuntu_version}" == "focal" ] ; then gem install jazzy --no-document ; 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
|
||||||
|
|
||||||
# cmake build
|
# cmake build
|
||||||
RUN apt-get update && apt-get install -y cmake ninja-build
|
RUN apt-get update && apt-get install -y cmake ninja-build
|
||||||
|
|
|
@ -31,7 +31,7 @@ if [[ "$(uname -s)" == "Linux" ]]; then
|
||||||
if [[ ! -d "$source_kitten_source_path" ]]; then
|
if [[ ! -d "$source_kitten_source_path" ]]; then
|
||||||
git clone https://github.com/jpsim/SourceKitten.git "$source_kitten_source_path"
|
git clone https://github.com/jpsim/SourceKitten.git "$source_kitten_source_path"
|
||||||
fi
|
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
|
if [[ ! -d "$source_kitten_path" ]]; then
|
||||||
rm -rf "$source_kitten_source_path/.swift-version"
|
rm -rf "$source_kitten_source_path/.swift-version"
|
||||||
cd "$source_kitten_source_path" && swift build && cd "$root_path"
|
cd "$source_kitten_source_path" && swift build && cd "$root_path"
|
||||||
|
@ -39,7 +39,7 @@ if [[ "$(uname -s)" == "Linux" ]]; then
|
||||||
# generate
|
# generate
|
||||||
for module in "${modules[@]}"; do
|
for module in "${modules[@]}"; do
|
||||||
if [[ ! -f "$root_path/.build/sourcekitten/$module.json" ]]; then
|
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 --spm --module-name $module > "$root_path/.build/sourcekitten/$module.json"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue