summaryrefslogtreecommitdiff
path: root/ios/docs/install_docs.sh
blob: 8fa768b997cb7682ba116823e4ff6f2cabddbc0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash

if [ -z `which appledoc` ]; then
    echo "Unable to find appledoc. See https://github.com/mapbox/mapbox-gl-native#manually"
    exit 1
fi

OUTPUT="/tmp/`uuidgen`"

VERSION=$( git tag -l ios\* --sort -v:refname | sed -n '1p' | sed 's/ios-v//' )
echo "Creating new docs for ${VERSION}..."
echo

README="/tmp/GL-README.md"
cat ../README.md > ${README}
echo >> ${README}
echo -n "#" >> ${README}
cat ../../CHANGELOG.md >> ${README}

appledoc \
    --output ${OUTPUT} \
    --project-name "Mapbox GL for iOS ${VERSION}" \
    --project-company Mapbox \
    --create-docset \
    --company-id com.mapbox \
    --ignore ../../include/mbgl/ios/private \
    --index-desc ${README} \
    ../../include/mbgl/ios