summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-05-04 16:07:08 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-05-04 16:07:08 -0700
commit8151a1e17fce418177e2ef4b63e56d8a013238e9 (patch)
treec17a294b5e432fadff364d0dc73d1562cd204773
parentc2858dd45f735d99b1bc46043cff0b2a6b176c63 (diff)
downloadqtlocation-mapboxgl-8151a1e17fce418177e2ef4b63e56d8a013238e9.tar.gz
add HTML docs generation to iOS packaging script
-rw-r--r--README.md4
-rwxr-xr-xscripts/ios/package.sh20
2 files changed, 22 insertions, 2 deletions
diff --git a/README.md b/README.md
index 06072f00fa..1b34fc33b2 100644
--- a/README.md
+++ b/README.md
@@ -48,8 +48,8 @@ Target OS X: 10.9+
If you merely want to install the library for iOS and try it out as an Objective-C consumer:
-0. Use [Homebrew](http://brew.sh/) to install Boost headers: `brew install boost`.
-1. Run `make ipackage`. The packaging script will produce the statically-linked `libMapboxGL.a`, `MapboxGL.bundle` for resources, and a `Headers` folder.
+0. Use [Homebrew](http://brew.sh/) to install Boost headers and [appledoc](http://gentlebytes.com/appledoc/): `brew install boost appledoc`.
+1. Run `make ipackage`. The packaging script will produce the statically-linked `libMapboxGL.a`, `MapboxGL.bundle` for resources, a `Headers` folder, and a `Docs` folder with HTML API documentation.
2. Copy the contents of `build/ios/pkg/static` into your project. It should happen automatically, but ensure that:
- `Headers` is in your *Header Search Paths* (`HEADER_SEARCH_PATHS`) build setting.
- `MapboxGL.bundle` is in your target's *Copy Bundle Resources* build phase.
diff --git a/scripts/ios/package.sh b/scripts/ios/package.sh
index 4cd22d48e6..dd9e216ace 100755
--- a/scripts/ios/package.sh
+++ b/scripts/ios/package.sh
@@ -92,3 +92,23 @@ cp -pv LICENSE.md "${OUTPUT}/static"
mkdir -p "${OUTPUT}/static/${NAME}.bundle"
cp -pv platform/ios/resources/* "${OUTPUT}/static/${NAME}.bundle"
cp -prv styles/styles "${OUTPUT}/static/${NAME}.bundle/styles"
+
+step "Creating API Docs..."
+if [ -z `which appledoc` ]; then
+ echo "Unable to find appledoc. Consider installing it from source or Homebrew."
+ exit 1
+fi
+DOCS_OUTPUT="${OUTPUT}/static/Docs"
+DOCS_VERSION=$( git tag -l ios\* --sort -v:refname | sed -n '1p' | sed 's/ios-v//' )
+appledoc \
+ --output ${DOCS_OUTPUT} \
+ --project-name "Mapbox GL for iOS ${DOCS_VERSION}" \
+ --project-company Mapbox \
+ --create-html \
+ --no-create-docset \
+ --no-install-docset \
+ --company-id com.mapbox \
+ include/mbgl/ios
+cd ${DOCS_OUTPUT}
+ln -s html/index.html
+cd ${OLDPWD}