-
Notifications
You must be signed in to change notification settings - Fork 3
/
updatedocs.command
executable file
·43 lines (33 loc) · 1.32 KB
/
updatedocs.command
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
#!/usr/bin/env bash
###
### WARNING WORK ONLY with cutom domain.
### See https://docs.github.com/articles/using-a-custom-domain-with-github-pages/ for more details
###
### Comit your files, then in the repo, go to Settings / Pages
### - Source should be branch/docs
### - Custom domain should be <your custom subdomain>
###
### Don't forget to add the CNAME to your DNS zone
###
export GITHUBNAME=charlymr
export SCHEME=IRLPDFScanContent
export CUSTOMDOMAIN=irlpdfscancontent.irlmobile.com
xcodebuild docbuild \
-scheme "${SCHEME}" \
-destination generic/platform=iOS \
-derivedDataPath DerivedData
rm -rf ${SCHEME}.doccarchive
find DerivedData \
-name "${SCHEME}.doccarchive" \
-exec cp -R {} ./ \;
rm -rf DerivedData
rm -rf docs
mv "${SCHEME}.doccarchive" docs
echo "${CUSTOMDOMAIN}" > docs/CNAME
mkdir -p docs/documentation
cp -pr docs/index.html docs/documentation/
mkdir -p docs/tutorial
cp -pr docs/index.html docs/tutorial/
cp -pr docs/data/documentation/*.json docs/data/documentation.json
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' > docs/index.html
echo '<html<head><META HTTP-EQUIV="refresh" content="0;URL=/documentation"></head></html>' >> docs/index.html