From 7ab8dc4018600dcf760c6029c62f04fb6e0257b3 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 28 Apr 2018 10:34:18 -0400 Subject: [PATCH] properly fail build when things break --- .travis.yml | 8 +++++--- bin/build-dist | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 923e97735..3016bb945 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ branches: cache: pip install: - | + set -e if [ -n "$BUILD" ]; then # Need this for inkex.py and friends wget -q https://inkscape.org/en/gallery/item/11254/inkscape-0.92.2.tar.bz2 @@ -39,7 +40,7 @@ install: # For some bizarre reason, this build has been failing due to the # key for the mongodb repo expiring. Maybe Travis includes the # mongodb repo by default...? - sudo rm /etc/apt/sources.list.d/mongodb*.list + sudo rm -f /etc/apt/sources.list.d/mongodb*.list # for shapely sudo apt-get install libgeos-dev @@ -73,7 +74,7 @@ install: export DISPLAY=:99.0 sh -e /etc/init.d/xvfb start sleep 3 - sudo apt-get install -y wine + sudo apt-get -q install -y wine export WINEDEBUG=-all @@ -103,8 +104,9 @@ before_script: - "echo LINT: $LINT BUILD: $BUILD" script: - | + set -e if [ -n "$LINT" ]; then - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude=embroidermodder + flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude=embroidermodder flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=embroidermodder elif [ "$BUILD" = "linux" ]; then ( diff --git a/bin/build-dist b/bin/build-dist index c8a2da2a8..a1fa82d9b 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -1,5 +1,7 @@ #!/bin/bash +set -e + site_packages="$(python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")" if [ "$TRAVIS_OS_NAME" = "linux" -a "$BUILD" != "windows" ]; then