From b6ebf840b4ac78dc0e2f822f6f058b402f6d3d62 Mon Sep 17 00:00:00 2001 From: John Hood Date: Sat, 3 Dec 2016 00:34:31 -0500 Subject: [PATCH] Rework Travis OS X build to eliminate subshells and "set -e". --- .travis.yml | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index cbbb61c..f11a878 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,17 +36,14 @@ before_install: # and is fairly quiet, so wrap it in travis_wait to keep it from # being killed. - | - ( - set -e - if test osx = "${TRAVIS_OS_NAME}"; then - macosx/brew-deps.sh install + if test osx = "${TRAVIS_OS_NAME}"; then + macosx/brew-deps.sh install && if test -n "${TRAVIS_TAG}"; then travis_wait 30 macosx/brew-deps.sh package_deps else macosx/brew-deps.sh deps fi - fi - ) + fi # Use before_script to report the build configuration. before_script: @@ -55,17 +52,15 @@ before_script: - env - git describe --long - | - ( - set -e - if test osx = "${TRAVIS_OS_NAME}" && test -n "${TRAVIS_TAG}"; then - rm -rf macosx/build-report "macosx/${TRAVIS_TAG}-build-report.tbz" - mkdir macosx/build-report - cd macosx/build-report - ../brew-deps.sh describe - ../osx-xcode.sh describe - tar -cjf "../${TRAVIS_TAG}-build-report.tbz" . - fi - ) + if test osx = "${TRAVIS_OS_NAME}" && test -n "${TRAVIS_TAG}"; then + rm -rf macosx/build-report "macosx/${TRAVIS_TAG}-build-report.tbz" && + mkdir macosx/build-report && + cd macosx/build-report && + ../brew-deps.sh describe && + ../osx-xcode.sh describe && + tar -cjf "../${TRAVIS_TAG}-build-report.tbz" . && + cd - + fi # 'make distcheck', and OS X package build on tag builds. script: @@ -75,12 +70,10 @@ script: # Build OS X package for tags. - | if test osx = "${TRAVIS_OS_NAME}" && test -n "${TRAVIS_TAG}"; then - ( - set -e - cd macosx - env ZERO_AR_DATE=1 MACOSX_DEPLOYMENT_TARGET=10.10 ./build.sh - shasum -a 256 "${TRAVIS_TAG}.pkg" "${TRAVIS_TAG}-build-report.tbz" - ) + cd macosx && + env ZERO_AR_DATE=1 MACOSX_DEPLOYMENT_TARGET=10.10 ./build.sh && + shasum -a 256 "${TRAVIS_TAG}.pkg" "${TRAVIS_TAG}-build-report.tbz" && + cd - fi # Deploy the OS X package and distribution tarball to a GitHub release. deploy: