mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-14 21:08:48 +00:00
Summary: Fixed build-docs script. Workaround for #373 Closes https://github.com/Instagram/IGListKit/pull/447 Differential Revision: D4479613 Pulled By: rnystrom fbshipit-source-id: abc61ed11ae01efbbe9b5aaab2036501d269f9c7
45 lines
1 KiB
Bash
Executable file
45 lines
1 KiB
Bash
Executable file
#!/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
|