diff options
Diffstat (limited to '.travis/deploy.sh')
-rwxr-xr-x | .travis/deploy.sh | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/.travis/deploy.sh b/.travis/deploy.sh index d9ccc0a..c002b35 100755 --- a/.travis/deploy.sh +++ b/.travis/deploy.sh @@ -12,11 +12,6 @@ if [[ "x${TRAVIS_BRANCH}" != "xmaster" ]] && [[ "x${TRAVIS_TAG}" != xv* ]]; then exit 0 fi -if [[ "x${CC}" != "xgcc" ]] || [[ "x${TARGET}" = "xvalgrind" ]] || [[ "x${TARGET}" = "xmake-embedded" ]]; then - echo "Invalid target for deploy. skipping ..." - exit 0 -fi - if [[ ! -d build ]]; then echo "Build directory not found." exit 1 @@ -30,6 +25,16 @@ else exit 1 fi +if [[ "x$(type -t deploy)" != "xfunction" ]] || [[ "x$(type -t deploy_condition)" != "xfunction" ]]; then + echo "Nothing to deploy. skipping ..." + exit 1 +fi + +if ! deploy_condition; then + echo "Deploy disabled. skipping ..." + exit 1 +fi + deploy TARNAME="$(grep PACKAGE_TARNAME build/config.h | cut -d\" -f2)" @@ -67,3 +72,9 @@ for f in "${FILES[@]}"; do echo done + +# this is a hack to allow failed tests to upload files. +# the target must write status code to build/.test_result, instead of exiting directly +if [[ -f build/.test_result ]]; then + exit $(cat build/.test_result) +fi |