summaryrefslogtreecommitdiff
path: root/platform/macos/scripts/document.sh
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/scripts/document.sh')
-rwxr-xr-xplatform/macos/scripts/document.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/platform/macos/scripts/document.sh b/platform/macos/scripts/document.sh
index d03ad91674..69c9aaa871 100755
--- a/platform/macos/scripts/document.sh
+++ b/platform/macos/scripts/document.sh
@@ -22,15 +22,21 @@ RELEASE_VERSION=$( echo ${SHORT_VERSION} | sed -e 's/^macos-v//' -e 's/-.*//' )
rm -rf /tmp/mbgl
mkdir -p /tmp/mbgl/
README=/tmp/mbgl/README.md
-cp platform/macos/docs/doc-README.md "${README}"
+if [[ ${STANDALONE:-} ]]; then
+ cp platform/macos/docs/pod-README.md "${README}"
+ perl -pi -e 's|https://raw.githubusercontent.com/mapbox/mapbox-gl-native/master/platform/macos/docs/||' \
+ "${README}"
+else
+ cp platform/macos/docs/doc-README.md "${README}"
+fi
# 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/macos/CHANGELOG.md >> "${README}"
+echo "## Changes in [version ${RELEASE_VERSION}](https://github.com/mapbox/mapbox-gl-native/releases/tag/${BRANCH})" >> "${README}"
+sed -n -e '/^## /{' -e ':a' -e 'n' -e '/^## /q' -e 'p' -e 'ba' -e '}' platform/macos/CHANGELOG.md >> "${README}"
rm -rf ${OUTPUT}
mkdir -p ${OUTPUT}
-cp platform/macos/screenshot.png "${OUTPUT}"
+cp -r platform/macos/docs/img "${OUTPUT}/img"
jazzy \
--config platform/macos/jazzy.yml \
@@ -38,7 +44,7 @@ jazzy \
--github-file-prefix https://github.com/mapbox/mapbox-gl-native/tree/${BRANCH} \
--module-version ${SHORT_VERSION} \
--readme ${README} \
- --documentation="platform/macos/docs/Info.plist Keys.md" \
+ --documentation="platform/{darwin,macos}/docs/guides/*.md" \
--theme platform/darwin/docs/theme \
--output ${OUTPUT}
# https://github.com/realm/jazzy/issues/411