[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.
This commit is contained in:
Minh Nguyễn
2016-01-22 12:15:50 -08:00
committed by Minh Nguyễn
parent 83deed6a88
commit f65ff9ef30
4 changed files with 22 additions and 3 deletions

View File

@@ -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

9
ios/docs/doc-README.md Normal file
View File

@@ -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/).

View File

@@ -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} \

View File

@@ -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"