diff options
Diffstat (limited to 'platform/ios/scripts/document.sh')
-rwxr-xr-x | platform/ios/scripts/document.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/platform/ios/scripts/document.sh b/platform/ios/scripts/document.sh index 407d5f9adf..d38e7707b2 100755 --- a/platform/ios/scripts/document.sh +++ b/platform/ios/scripts/document.sh @@ -28,11 +28,10 @@ RELEASE_VERSION=$( echo ${SHORT_VERSION} | sed -e 's/^ios-v//' -e 's/-.*//' ) rm -rf /tmp/mbgl mkdir -p /tmp/mbgl/ + +echo "Generating readme and release notes" README=/tmp/mbgl/README.md -cp platform/ios/docs/doc-README.md "${README}" -# http://stackoverflow.com/a/4858011/4585461 -echo "## Changes in version ${RELEASE_VERSION}" >> "${README}" -sed -n -e '/^## /{' -e ':a' -e 'n' -e '/^## /q' -e 'p' -e 'ba' -e '}' platform/ios/CHANGELOG.md >> "${README}" +node platform/ios/scripts/release-notes.js jazzy >> "${README}" rm -rf ${OUTPUT} mkdir -p ${OUTPUT} @@ -40,6 +39,7 @@ mkdir -p ${OUTPUT} cp -r platform/darwin/docs/img "${OUTPUT}" cp -r platform/ios/docs/img "${OUTPUT}" +echo "Generating jazzy docs for ${SHORT_VERSION}…" DEFAULT_THEME="platform/darwin/docs/theme" THEME=${JAZZY_THEME:-$DEFAULT_THEME} @@ -53,6 +53,7 @@ jazzy \ --root-url https://www.mapbox.com/ios-sdk/api/${RELEASE_VERSION}/ \ --theme ${THEME} \ --output ${OUTPUT} + # https://github.com/realm/jazzy/issues/411 find ${OUTPUT} -name *.html -exec \ - perl -pi -e 's/BRANDLESS_DOCSET_TITLE/iOS SDK $1/, s/Mapbox\s+(Docs|Reference)/Mapbox iOS SDK $1/' {} \; + perl -pi -e 's/BRANDLESS_DOCSET_TITLE/iOS SDK $1/, s/Mapbox\s+(Docs|Reference)/Mapbox Maps SDK for iOS $1/' {} \; |