summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-01-22 12:15:50 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-01-22 14:45:58 -0800
commitf65ff9ef30e7b110d70ba0486604f5f18db490f6 (patch)
treee77f7e0e5167dbe2f0c4375e72e260cb8ab19de6
parent83deed6a8873dca5163dfe8557a36b8289a2c6e5 (diff)
downloadqtlocation-mapboxgl-f65ff9ef30e7b110d70ba0486604f5f18db490f6.tar.gz
[ios] Split API index from package readme
The API index page serves a different purpose than the readme. It doesn’t need installation instructions, but it does need a brief What’s New section.
-rw-r--r--Makefile2
-rw-r--r--ios/docs/doc-README.md9
-rwxr-xr-xplatform/ios/scripts/document.sh12
-rwxr-xr-xplatform/ios/scripts/package.sh2
4 files changed, 22 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cefbfb424b..c66e2b007a 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@ ipackage-strip: Xcode/ios ; @JOBS=$(JOBS) BITCODE=$(BITCODE) FORMAT=$(FORMAT) BU
ipackage-sim: Xcode/ios ; @JOBS=$(JOBS) BUILDTYPE=Debug BITCODE=$(BITCODE) FORMAT=dynamic BUILD_DEVICE=false SYMBOLS=$(SYMBOLS) ./platform/ios/scripts/package.sh
iframework: Xcode/ios ; @JOBS=$(JOBS) BITCODE=$(BITCODE) FORMAT=dynamic BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=$(SYMBOLS) ./platform/ios/scripts/package.sh
itest: ipackage-sim ; ./platform/ios/scripts/test.sh
-idocument: ; OUTPUT=$(OUTPUT) README=$(README) ./platform/ios/scripts/document.sh
+idocument: ; OUTPUT=$(OUTPUT) ./platform/ios/scripts/document.sh
.PHONY: xpackage xpackage-strip xctest
xpackage: Xcode/osx ; @JOBS=$(JOBS) ./platform/osx/scripts/package.sh
diff --git a/ios/docs/doc-README.md b/ios/docs/doc-README.md
new file mode 100644
index 0000000000..59cc8bd2d3
--- /dev/null
+++ b/ios/docs/doc-README.md
@@ -0,0 +1,9 @@
+# [Mapbox iOS SDK](https://www.mapbox.com/ios-sdk/)
+
+The Mapbox iOS SDK is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa Touch applications on iOS 7.0 and above using Objective-C, Swift, or Interface Builder. It takes stylesheets that conform to the [Mapbox GL Style Specification](https://github.com/mapbox/mapbox-gl-style-spec/), applies them to vector tiles that conform to the [Mapbox Vector Tile Specification](https://github.com/mapbox/vector-tile-spec), and renders them using OpenGL.
+
+[![](https://raw.githubusercontent.com/mapbox/mapbox-gl-native/master/ios/screenshot.png)]()
+
+For setup information, check out the [Mapbox iOS SDK homepage](https://www.mapbox.com/ios-sdk/). For detailed usage instructions, read “[First steps with the Mapbox iOS SDK](https://www.mapbox.com/guides/first-steps-ios-sdk/)” and consult the [online examples](https://www.mapbox.com/ios-sdk/examples/). A [full changelog](https://github.com/mapbox/mapbox-gl-native/blob/master/CHANGELOG.md) is also available.
+
+If you have any questions, please contact <mobile@mapbox.com>. We welcome your [bug reports and feature requests](https://github.com/mapbox/mapbox-gl-native/issues/).
diff --git a/platform/ios/scripts/document.sh b/platform/ios/scripts/document.sh
index b865b33f3c..5f3eb31849 100755
--- a/platform/ios/scripts/document.sh
+++ b/platform/ios/scripts/document.sh
@@ -14,12 +14,22 @@ if [ -z `which jazzy` ]; then
fi
OUTPUT=${OUTPUT:-documentation}
-README=${README:-README.md}
BRANCH=$( git describe --tags --match=ios-v*.*.* --abbrev=0 )
SHORT_VERSION=$( echo ${BRANCH} | sed 's/^ios-v//' )
RELEASE_VERSION=$( echo ${SHORT_VERSION} | sed -e 's/^ios-v//' -e 's/-.*//' )
+rm -rf /tmp/mbgl
+mkdir -p /tmp/mbgl/
+README=/tmp/mbgl/README.md
+cp ios/docs/doc-README.md "${README}"
+# http://stackoverflow.com/a/4858011/4585461
+echo "## Changes in version ${RELEASE_VERSION}" >> "${README}"
+sed -n -e '/^## iOS/{' -e ':a' -e 'n' -e '/^##/q' -e 'p' -e 'ba' -e '}' CHANGELOG.md >> "${README}"
+
+rm -rf ${OUTPUT}
+mkdir -p ${OUTPUT}
+
jazzy \
--sdk iphonesimulator \
--github-file-prefix https://github.com/mapbox/mapbox-gl-native/tree/${BRANCH} \
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index eff587c7db..97f0c74fc7 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -228,4 +228,4 @@ sed -i '' \
cp ${README} "${OUTPUT}"
step "Generating API documentation…"
-make idocument OUTPUT="${OUTPUT}/documentation" README=${README}
+make idocument OUTPUT="${OUTPUT}/documentation"