This repository has been archived by the owner on Oct 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
GenerateHelperFrameworkDocs.sh
executable file
·85 lines (67 loc) · 2.3 KB
/
GenerateHelperFrameworkDocs.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/sh
# remove everything generated by this script
function cleanup
{
rm -rf helperdocs
rm -rf HelperDocumentation
}
VERSION="1.0.0"
if [ -n $1 ] && [ "$1" == "clean" ];
then
cleanup
exit 0
else
cd "$SOURCE_ROOT"
if [ -d docs ];
then
cleanup
fi
rm -rf docs_tmp
mkdir -p docs
mkdir -p docs_tmp
cp -r AWSMobileHubHelper ./docs_tmp/AWSMobileHubHelper
cp -r AWSFacebookSignIn ./docs_tmp/AWSFacebookSignIn
cp -r AWSGoogleSignIn ./docs_tmp/AWSGoogleSignIn
cp -r AWSSamlSignIn ./docs_tmp/AWSSamlSignIn
cp -r AWSCognitoUserPoolsSignIn ./docs_tmp/AWSCognitoUserPoolsSignIn
cp -r AWSMobileHubAuthorizers ./docs_tmp/AWSMobileHubAuthorizers
cd docs_tmp
rm -rf AWSMobileHubHelper/Facebook
rm -rf AWSMobileHubHelper/Google
# generate documenation
appledoc --verbose 0 \
--output ../docs \
--exit-threshold 2 \
--no-repeat-first-par \
--explicit-crossref \
--docset-install-path ../docs \
--docset-bundle-filename com.amazon.aws.ios.mobilehub.helper.docset \
--company-id aws.amazon.com \
--project-name "AWS iOS Mobile Hub Helper Library v${VERSION}" \
--project-version "${VERSION}" \
--project-company "Amazon Web Services, Inc." \
--create-html \
--finalize-docset \
--keep-intermediate-files \
--index-desc ../aws-ios-mobile-hub-helper.markdown \
./
# get command execution result
result=$?
if [ $result != 0 ];
then
echo "Building the AWS Mobile Hub Helper documentation FAILED!"
cleanup;
exit 1;
fi
cd ..
# pack html doc into a zip file
(cd docs/html; zip -q -r --symlinks ../aws-ios-mobilehub-helper-docs.zip .)
rm -rf Documentation
mkdir Documentation
mv docs/html Documentation
mv docs/com.amazon.aws.ios.mobilehub.helper.docset Documentation
mv docs/aws-ios-mobilehub-helper-docs.zip Documentation
rm -rf docs
rm -rf docs_tmp
exit 0
fi