Files
MapLibreParticleLab/scripts/ios/run.sh
John Firebaugh 4db34bd9ef Don't do things that set -e in Travis's shell
Sourcing files that set flags bleed into Travis' wrapper script, which
messes with their workflow, e.g. preventing after_failure scripts from
triggering.

These changes fix that:

* Move exported variables from install.sh to setup.sh, so install.sh
  doesn't have to be sourced.
* Source setup.sh from run.sh, rather than directly from .travis.yml.

In addition, as a good practice, remove `set -e` etc. from setup.sh,
and add a comment not to add them back. It's the sourcing script's
responsibility to set these flags.
2015-05-13 15:21:56 -07:00

33 lines
786 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -o pipefail
set -u
source ./scripts/ios/setup.sh
BUILDTYPE=${BUILDTYPE:-Release}
PUBLISH_TAG=($(git show -s --format=%B | sed -n 's/.*\[publish \([a-z]\{1,\}\)-v\([0-9.]\{1,\}\)\].*/\1 \2/p'))
PUBLISH_PLATFORM=${PUBLISH_TAG[0],-}
PUBLISH_VERSION=${PUBLISH_TAG[1],-}
################################################################################
# Build
################################################################################
if [[ ${PUBLISH_PLATFORM} = 'ios' ]]; then
# build & package iOS
mapbox_time "package_ios" \
make ipackage
# publish iOS build
mapbox_time "deploy_ios" \
./scripts/ios/publish.sh "${PUBLISH_VERSION}"
else
# build & test iOS
mapbox_time "run_ios_tests" \
make ipackage-sim
fi