51
51
if ! command -v jazzy > /dev/null; then
52
52
gem install jazzy --no-ri --no-rdoc
53
53
fi
54
- module_switcher=" docs/$version /README.md"
54
+
55
+ jazzy_dir=" $root_path /.build/jazzy"
56
+ rm -rf " $jazzy_dir "
57
+ mkdir -p " $jazzy_dir "
58
+
59
+ module_switcher=" $jazzy_dir /README.md"
55
60
jazzy_args=(--clean
56
61
--author ' SwiftLog team'
57
62
--readme " $module_switcher "
@@ -68,15 +73,12 @@ SwiftLog is a Swift logging API package.
68
73
To get started with SwiftLog, [`import Logging`](../Logging/index.html). The
69
74
most important type is [`Logger`](https://apple.github.io/swift-log/docs/current/Logging/Structs/Logger.html)
70
75
which you can use to emit log messages.
71
-
72
76
EOF
73
77
74
- jazzy_dir=" $root_path /.build/jazzy"
75
- rm -rf " $jazzy_dir "
76
- mkdir -p " $jazzy_dir "
77
-
78
78
for module in " ${modules[@]} " ; do
79
- args=(" ${jazzy_args[@]} " --output " $jazzy_dir /docs/$version /$module " --docset-path " $jazzy_dir /docset/$version /$module " --module " $module " )
79
+ args=(" ${jazzy_args[@]} " --output " $jazzy_dir /docs/$version /$module " --docset-path " $jazzy_dir /docset/$version /$module "
80
+ --module " $module " --module-version $version
81
+ --root-url " https://apple.github.io/swift-log/docs/$version /$module /" )
80
82
if [[ -f " $root_path /.build/sourcekitten/$module .json" ]]; then
81
83
args+=(--sourcekitten-sourcefile " $root_path /.build/sourcekitten/$module .json" )
82
84
fi
@@ -89,8 +91,9 @@ if [[ $PUSH == true ]]; then
89
91
GIT_AUTHOR=$( git --no-pager show -s --format=' %an <%ae>' HEAD)
90
92
git fetch origin +gh-pages:gh-pages
91
93
git checkout gh-pages
92
- rm -rf " docs"
93
- cp -r " $jazzy_dir /docs" .
94
+ rm -rf " docs/$version "
95
+ rm -rf " docs/current"
96
+ cp -r " $jazzy_dir /docs/$version " docs/
94
97
cp -r " docs/$version " docs/current
95
98
git add --all docs
96
99
echo ' <html><head><meta http-equiv="refresh" content="0; url=docs/current/Logging/index.html" /></head></html>' > index.html
0 commit comments