forked from attaswift/BigInt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-docs.sh
executable file
·32 lines (27 loc) · 992 Bytes
/
generate-docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
set -e
module="BigInt"
workspace="BigInt.xcworkspace"
scheme="BigInt-macOS"
version="$(grep VERSION_STRING version.xcconfig | sed 's/^VERSION_STRING = //' | sed 's/ *$//')"
today="$(date '+%Y-%m-%d')"
if git rev-parse "v$version" >/dev/null 2>&1; then
# Use the tagged commit when we have one
ref="v$version"
else
# Otherwise, use the current commit.
ref="$(git rev-parse HEAD)"
fi
jazzy \
--clean \
--author "Károly Lőrentey" \
--author_url "https://twitter.com/lorentey" \
--github_url "https://github.com/attaswift/$module" \
--github-file-prefix "https://github.com/attaswift/$module/tree/$ref" \
--module-version "$version" \
--copyright "© 2016 [Károly Lőrentey](https://twitter.com/lorentey). (Last updated: $today)" \
--xcodebuild-arguments "-workspace,$workspace,-scheme,$scheme" \
--module "$module" \
--root-url "https://attaswift.github.io/$module/reference/" \
--theme fullwidth \
--output docs