Terminate if one of the commands fail inside an if statement
This commit is contained in:
parent
f416ef925b
commit
5d7caafdf7
36
.travis.yml
36
.travis.yml
|
@ -15,24 +15,24 @@ before_install:
|
||||||
chmod 600 ~/.ssh/id_rsa ;
|
chmod 600 ~/.ssh/id_rsa ;
|
||||||
fi
|
fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||||
docker build -f Dockerfile -t strawberry-build .;
|
docker build -f Dockerfile -t strawberry-build . || travis_terminate 1;
|
||||||
docker run --name build -itd strawberry-build /bin/bash;
|
docker run --name build -itd strawberry-build /bin/bash || travis_terminate 1;
|
||||||
docker exec build git clone https://github.com/jonaski/strawberry;
|
docker exec build git clone https://github.com/jonaski/strawberry;
|
||||||
fi
|
fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
git fetch --unshallow;
|
git fetch --unshallow || travis_terminate 1;
|
||||||
git pull;
|
git pull || travis_terminate 1;
|
||||||
brew update;
|
brew update || travis_terminate 1;
|
||||||
brew unlink python;
|
brew unlink python || travis_terminate 1;
|
||||||
brew install glib pkgconfig libffi protobuf protobuf-c qt gettext gnutls fftw;
|
brew install glib pkgconfig libffi protobuf protobuf-c qt gettext gnutls fftw || travis_terminate 1;
|
||||||
brew install sqlite --with-fts;
|
brew install sqlite --with-fts || travis_terminate 1;
|
||||||
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav;
|
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav || travis_terminate 1;
|
||||||
brew install chromaprint;
|
brew install chromaprint || travis_terminate 1;
|
||||||
brew install libcdio libmtp libimobiledevice libplist;
|
brew install libcdio libmtp libimobiledevice libplist || travis_terminate 1;
|
||||||
export Qt5_DIR=/usr/local/opt/qt5/lib/cmake;
|
export Qt5_DIR=/usr/local/opt/qt5/lib/cmake || travis_terminate 1;
|
||||||
export Qt5LinguistTools_DIR=/usr/local/Cellar/qt/$(ls /usr/local/Cellar/qt | head -n1)/lib/cmake/Qt5LinguistTools;
|
export Qt5LinguistTools_DIR=/usr/local/Cellar/qt/$(ls /usr/local/Cellar/qt | head -n1)/lib/cmake/Qt5LinguistTools || travis_terminate 1;
|
||||||
export PATH="/usr/local/opt/gettext/bin:$PATH";
|
export PATH="/usr/local/opt/gettext/bin:$PATH" || travis_terminate 1;
|
||||||
export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/$(ls /usr/local/Cellar/libffi | head -n1)/lib/pkgconfig/:$PKG_CONFIG_PATH;
|
export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/$(ls /usr/local/Cellar/libffi | head -n1)/lib/pkgconfig/:$PKG_CONFIG_PATH || travis_terminate 1;
|
||||||
ls /usr/local/lib/gstreamer-1.0;
|
ls /usr/local/lib/gstreamer-1.0;
|
||||||
fi
|
fi
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -41,9 +41,9 @@ before_script:
|
||||||
script:
|
script:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build make -C build -j8 ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build make -C build -j8 ; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
make -j8;
|
make -j8 || travis_terminate 1;
|
||||||
sudo make install;
|
sudo make install || travis_terminate 1;
|
||||||
sudo ../dist/macos/macdeploy.py strawberry.app;
|
sudo ../dist/macos/macdeploy.py strawberry.app || travis_terminate 1;
|
||||||
../dist/macos/create-dmg.sh strawberry.app;
|
../dist/macos/create-dmg.sh strawberry.app;
|
||||||
fi
|
fi
|
||||||
after_success:
|
after_success:
|
||||||
|
|
Loading…
Reference in New Issue