diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-06-11 12:30:52 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-06-17 15:33:00 -0700 |
commit | 91641ffb01dcf8d303b13216797bb41d1f770124 (patch) | |
tree | ebf706053d5190431b82c6bccf0623c0ab18075a /scripts | |
parent | 73737445ec0333b701b64613d8b92e18f45ea314 (diff) | |
download | qtlocation-mapboxgl-91641ffb01dcf8d303b13216797bb41d1f770124.tar.gz |
Lightweight generics
Added lightweight generics annotations to collection-typed method and protocol signatures to streamline usage of these members in Swift. Lightweight generic type specifiers are wrapped in conditionally-compiled macros for compatibility with Xcode 6.x.
Manually preprocess the NS_*_OF() macros in a temporary copy of each header before appledoc sees the headers. Also removed the --ignore flag because we no longer have a private headers folder under include/mbgl/ios/.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ios/package.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/ios/package.sh b/scripts/ios/package.sh index cccaa4aad2..5d7cbdc32d 100755 --- a/scripts/ios/package.sh +++ b/scripts/ios/package.sh @@ -110,11 +110,19 @@ if [ -z `which appledoc` ]; then fi DOCS_OUTPUT="${OUTPUT}/static/Docs" DOCS_VERSION=$( git tag -l ios\* --sort -v:refname | sed -n '1p' | sed 's/^v//' ) -README="/tmp/GL-README.md" +rm -rf /tmp/mbgl +mkdir -p /tmp/mbgl/ +README=/tmp/mbgl/GL-README.md cat ios/README.md > ${README} echo >> ${README} echo -n "#" >> ${README} cat CHANGELOG.md >> ${README} +# Copy headers to a temporary location where we can substitute macros that appledoc doesn't understand. +cp -r "${OUTPUT}/static/Headers" /tmp/mbgl +perl \ + -pi \ + -e 's/NS_(?:(MUTABLE)_)?(ARRAY|SET|DICTIONARY)_OF\(\s*(.+?)\s*\)/NS\L\u$1\u$2\E <$3>/g' \ + /tmp/mbgl/Headers/*.h appledoc \ --output ${DOCS_OUTPUT} \ --project-name "Mapbox GL for iOS ${DOCS_VERSION}" \ @@ -123,6 +131,5 @@ appledoc \ --no-create-docset \ --no-install-docset \ --company-id com.mapbox \ - --ignore include/mbgl/ios/private \ --index-desc ${README} \ - include/mbgl/ios + /tmp/mbgl/Headers |