Rework Travis OS X build to eliminate subshells and "set -e".

This commit is contained in:
John Hood
2016-12-03 00:34:31 -05:00
parent 9f59c69e40
commit b6ebf840b4
+16 -23
View File
@@ -36,17 +36,14 @@ before_install:
# and is fairly quiet, so wrap it in travis_wait to keep it from # and is fairly quiet, so wrap it in travis_wait to keep it from
# being killed. # being killed.
- | - |
( if test osx = "${TRAVIS_OS_NAME}"; then
set -e macosx/brew-deps.sh install &&
if test osx = "${TRAVIS_OS_NAME}"; then
macosx/brew-deps.sh install
if test -n "${TRAVIS_TAG}"; then if test -n "${TRAVIS_TAG}"; then
travis_wait 30 macosx/brew-deps.sh package_deps travis_wait 30 macosx/brew-deps.sh package_deps
else else
macosx/brew-deps.sh deps macosx/brew-deps.sh deps
fi fi
fi fi
)
# Use before_script to report the build configuration. # Use before_script to report the build configuration.
before_script: before_script:
@@ -55,17 +52,15 @@ before_script:
- env - env
- git describe --long - git describe --long
- | - |
( if test osx = "${TRAVIS_OS_NAME}" && test -n "${TRAVIS_TAG}"; then
set -e rm -rf macosx/build-report "macosx/${TRAVIS_TAG}-build-report.tbz" &&
if test osx = "${TRAVIS_OS_NAME}" && test -n "${TRAVIS_TAG}"; then mkdir macosx/build-report &&
rm -rf macosx/build-report "macosx/${TRAVIS_TAG}-build-report.tbz" cd macosx/build-report &&
mkdir macosx/build-report ../brew-deps.sh describe &&
cd macosx/build-report ../osx-xcode.sh describe &&
../brew-deps.sh describe tar -cjf "../${TRAVIS_TAG}-build-report.tbz" . &&
../osx-xcode.sh describe cd -
tar -cjf "../${TRAVIS_TAG}-build-report.tbz" . fi
fi
)
# 'make distcheck', and OS X package build on tag builds. # 'make distcheck', and OS X package build on tag builds.
script: script:
@@ -75,12 +70,10 @@ script:
# Build OS X package for tags. # Build OS X package for tags.
- | - |
if test osx = "${TRAVIS_OS_NAME}" && test -n "${TRAVIS_TAG}"; then if test osx = "${TRAVIS_OS_NAME}" && test -n "${TRAVIS_TAG}"; then
( cd macosx &&
set -e env ZERO_AR_DATE=1 MACOSX_DEPLOYMENT_TARGET=10.10 ./build.sh &&
cd macosx shasum -a 256 "${TRAVIS_TAG}.pkg" "${TRAVIS_TAG}-build-report.tbz" &&
env ZERO_AR_DATE=1 MACOSX_DEPLOYMENT_TARGET=10.10 ./build.sh cd -
shasum -a 256 "${TRAVIS_TAG}.pkg" "${TRAVIS_TAG}-build-report.tbz"
)
fi fi
# Deploy the OS X package and distribution tarball to a GitHub release. # Deploy the OS X package and distribution tarball to a GitHub release.
deploy: deploy: