forked from Instagram/IGListKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_docs.sh
executable file
·45 lines (38 loc) · 1.04 KB
/
build_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
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Docs by jazzy
# https://github.com/realm/jazzy
# ------------------------------
SOURCE=Source
SOURCE_TMP=IGListKit
SOURCEDIR=Source/
COMMONDIR=Source/Common/
# store all the file names in Common folder
COMMONFILES=($(find Source/Common -maxdepth 1 -type f -exec basename {} \;))
# move files in Common folder to Source folder
for f in "${COMMONFILES[@]}"
do
mv $COMMONDIR$f $SOURCE
done
# temporary workaround when using SPM dir format
# https://github.com/realm/jazzy/issues/667
mv $SOURCE $SOURCE_TMP
jazzy \
--objc \
--clean \
--author 'Instagram' \
--author_url 'https://twitter.com/fbOpenSource' \
--github_url 'https://github.com/Instagram/IGListKit' \
--sdk iphonesimulator \
--module 'IGListKit' \
--framework-root . \
--umbrella-header $SOURCE_TMP/IGListKit.h \
--readme README.md \
--documentation "Guides/*.md" \
--output docs/
# restore the dir per the jazzy issue
mv $SOURCE_TMP $SOURCE
# move files back to Common folder
for f in "${COMMONFILES[@]}"
do
mv $SOURCEDIR$f $COMMONDIR
done