summaryrefslogtreecommitdiff
path: root/scripts/travis_script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/travis_script.sh')
-rwxr-xr-xscripts/travis_script.sh25
1 files changed, 18 insertions, 7 deletions
diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh
index 45bda62c37..6c2ef672dd 100755
--- a/scripts/travis_script.sh
+++ b/scripts/travis_script.sh
@@ -3,6 +3,11 @@
set -e
set -o pipefail
+COMMIT_MESSAGE=$(git show -s --format=%B $1 | tr -d '\n')
+PUBLISH_TAG=$(echo "$COMMIT_MESSAGE" | grep -oE '\[publish [a-z0-9\.\-]+\]' | grep -oE '[a-z0-9\.\-]+' | tail -n1)
+PUBLISH_PLATFORM=$(echo "$PUBLISH_TAG" | awk -F '-' '{ print $1 }')
+PUBLISH_VERSION=$(echo "$PUBLISH_TAG" | awk -F '-v' '{ print $2 }')
+
mapbox_time "checkout_styles" \
git submodule update --init styles
@@ -34,18 +39,24 @@ elif [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
mapbox_time_finish
fi
-elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
+elif [[ ${TRAVIS_OS_NAME} == "osx" && ${MASON_PLATFORM} == "osx" ]]; then
#
# build OS X
#
- mapbox_time "build_osx_project" \
+ mapbox_time "build_osx" \
make xosx -j$JOBS
+elif [[ ${TRAVIS_OS_NAME} == "osx" && ${MASON_PLATFORM} == "ios" ]]; then
+ #
+ # build & package iOS
#
- # build iOS
+ mapbox_time "package_ios"
+ make ipackage
#
- mapbox_time "build_ios_project_device_release" \
- make ios -j$JOBS
- mapbox_time "build_ios_project_simulator_debug" \
- make isim -j$JOBS
+ # conditionally deploy iOS build
+ #
+ if [[ -n "$PUBLISH_TAG" ]]; then
+ mapbox_time "deploy_ios"
+ ./scripts/deploy_ios.sh "$PUBLISH_VERSION"
+ fi
fi