summaryrefslogtreecommitdiff
path: root/platform/ios/scripts/run.sh
blob: 02699f29b63f728cc983120b2bcd55046aa97ee2 (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
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash

set -e
set -o pipefail
set -u

source ./platform/ios/scripts/setup.sh

BUILDTYPE=${BUILDTYPE:-Release}

PUBLISH_TAG=($(git show -s --format=%B | sed -n 's/.*\[publish \([a-z]\{1,\}\)-v\([0-9a-z.\-]\{1,\}\)\].*/\1 \2/p'))
PUBLISH_PLATFORM=${PUBLISH_TAG[0],-}
PUBLISH_VERSION=${PUBLISH_TAG[1],-}


################################################################################
# Build
################################################################################

if [[ ${PUBLISH_PLATFORM} = 'ios' ]]; then
    # default, with debug symbols
    mapbox_time "package_ios_symbols" \
    make ipackage

    mapbox_time "deploy_ios_symbols"
    ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}" symbols

    # no debug symbols, for smaller distribution
    mapbox_time "package_ios_stripped" \
    make ipackage-strip

    mapbox_time "deploy_ios_stripped"
    ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}"
else
    # build & test iOS
    mapbox_time "run_ios_tests" \
    make itest
fi