diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-05-13 15:10:26 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-05-13 15:21:56 -0700 |
commit | 4db34bd9efc7c54088e8bcbdf8daae760cc5cdc0 (patch) | |
tree | 0237e659dc58928edb6a3ced407e07c2d04596d5 /scripts/travis_helper.sh | |
parent | b334b7ee4ef83b28635f6409db1d6ec8630da91d (diff) | |
download | qtlocation-mapboxgl-4db34bd9efc7c54088e8bcbdf8daae760cc5cdc0.tar.gz |
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.
Diffstat (limited to 'scripts/travis_helper.sh')
-rwxr-xr-x | scripts/travis_helper.sh | 4 |
1 files changed, 4 insertions, 0 deletions
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)) ;; |