diff options
-rw-r--r-- | .travis.yml | 5 | ||||
-rwxr-xr-x | scripts/ios/install.sh | 1 | ||||
-rwxr-xr-x | scripts/ios/run.sh | 5 | ||||
-rw-r--r-- | scripts/ios/setup.sh | 5 | ||||
-rwxr-xr-x | scripts/linux/install.sh | 2 | ||||
-rwxr-xr-x | scripts/linux/run.sh | 2 | ||||
-rwxr-xr-x | scripts/linux/setup.sh | 5 | ||||
-rwxr-xr-x | scripts/osx/install.sh | 1 | ||||
-rwxr-xr-x | scripts/osx/run.sh | 2 | ||||
-rwxr-xr-x | scripts/osx/setup.sh | 5 | ||||
-rwxr-xr-x | scripts/travis_helper.sh | 4 |
11 files changed, 23 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml index 73ac6ec5a5..770d9325fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,10 +86,7 @@ before_install: - source ./scripts/travis_helper.sh install: -- source ./scripts/${FLAVOR}/install.sh - -before_script: -- if [ -f ./scripts/${FLAVOR}/setup.sh ]; then source ./scripts/${FLAVOR}/setup.sh; fi +- ./scripts/${FLAVOR}/install.sh script: - ./scripts/${FLAVOR}/run.sh diff --git a/scripts/ios/install.sh b/scripts/ios/install.sh index 50f43c26b0..ffa714f36f 100755 --- a/scripts/ios/install.sh +++ b/scripts/ios/install.sh @@ -5,7 +5,6 @@ set -o pipefail mapbox_time "checkout_mason" \ git submodule update --init .mason -export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" mapbox_time "install_xcpretty" \ gem install xcpretty --no-rdoc --no-ri --no-document --quiet diff --git a/scripts/ios/run.sh b/scripts/ios/run.sh index e25f9a3025..dbf785081b 100755 --- a/scripts/ios/run.sh +++ b/scripts/ios/run.sh @@ -4,10 +4,9 @@ set -e set -o pipefail set -u -BUILDTYPE=${BUILDTYPE:-Release} +source ./scripts/ios/setup.sh -# Add Mason to PATH -export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" +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],-} diff --git a/scripts/ios/setup.sh b/scripts/ios/setup.sh new file mode 100644 index 0000000000..d115cf9020 --- /dev/null +++ b/scripts/ios/setup.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# This script is sourced; do not set -e or -o pipefail here. + +# Ensure mason is on the PATH +export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" diff --git a/scripts/linux/install.sh b/scripts/linux/install.sh index 1504da2a1f..a254d312ec 100755 --- a/scripts/linux/install.sh +++ b/scripts/linux/install.sh @@ -5,7 +5,7 @@ set -o pipefail mapbox_time "checkout_mason" \ git submodule update --init .mason -export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" +PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" \ mapbox_time "install_mesa" \ mason install mesa 10.4.3 diff --git a/scripts/linux/run.sh b/scripts/linux/run.sh index 6a703fc7fb..daaa35b249 100755 --- a/scripts/linux/run.sh +++ b/scripts/linux/run.sh @@ -3,6 +3,8 @@ set -e set -o pipefail +source ./scripts/linux/setup.sh + BUILDTYPE=${BUILDTYPE:-Release} ################################################################################ diff --git a/scripts/linux/setup.sh b/scripts/linux/setup.sh index 15b664862e..af0eafb5cf 100755 --- a/scripts/linux/setup.sh +++ b/scripts/linux/setup.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash +# This script is sourced; do not set -e or -o pipefail here. -set -e -set -o pipefail +# Ensure mason is on the PATH +export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" # Set the core file limit to unlimited so a core file is generated upon crash ulimit -c unlimited -S diff --git a/scripts/osx/install.sh b/scripts/osx/install.sh index a430b5495d..d6d9c065cf 100755 --- a/scripts/osx/install.sh +++ b/scripts/osx/install.sh @@ -5,7 +5,6 @@ set -o pipefail mapbox_time "checkout_mason" \ git submodule update --init .mason -export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" mapbox_time "install_xcpretty" \ gem install xcpretty --no-rdoc --no-ri --no-document --quiet diff --git a/scripts/osx/run.sh b/scripts/osx/run.sh index 4f086424ba..70d54c5ce9 100755 --- a/scripts/osx/run.sh +++ b/scripts/osx/run.sh @@ -3,6 +3,8 @@ set -e set -o pipefail +source ./scripts/osx/setup.sh + BUILDTYPE=${BUILDTYPE:-Release} ################################################################################ diff --git a/scripts/osx/setup.sh b/scripts/osx/setup.sh index 881a5b40a0..502d61d44d 100755 --- a/scripts/osx/setup.sh +++ b/scripts/osx/setup.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash +# This script is sourced; do not set -e or -o pipefail here. -set -e -set -o pipefail +# Ensure mason is on the PATH +export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" # Set the core file limit to unlimited so a core file is generated upon crash ulimit -c unlimited -S diff --git a/scripts/travis_helper.sh b/scripts/travis_helper.sh index 5e7dd46f4f..5a765b131d 100755 --- a/scripts/travis_helper.sh +++ b/scripts/travis_helper.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +# This script is sourced, so do not set -e or -o pipefail here. Doing so would +# bleed into Travis' wrapper script, which messes with their workflow, e.g. +# preventing after_failure scripts to be triggered. + case `uname -s` in 'Darwin') JOBS=$((`sysctl -n hw.ncpu` + 2)) ;; 'Linux') JOBS=$((`nproc` + 2)) ;; |