diff --git a/.travis.yml b/.travis.yml index fb3ad83a..ff8aa633 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,20 +60,20 @@ matrix: before_install: - chmod +x travis/*.sh - - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then travis/linux_before_install.sh; fi + - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then source travis/linux_before_install.sh; fi install: - - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then travis/linux_install.sh; fi + - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then source travis/linux_install.sh; fi script: # - git submodule update --init --recursive # - git describe --long - - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then travis/linux_script.sh; fi -# - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then travis/osx_script.sh; fi + - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then source travis/linux_script.sh; fi +# - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then source travis/osx_script.sh; fi - pwd && ls after_success: - - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then travis/linux_after_success.sh; fi + - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then source travis/linux_after_success.sh; fi # deploy: # # Deploy packages to Github Release diff --git a/travis/linux_after_success.sh b/travis/linux_after_success.sh index 8ee3f8cb..4a2e2711 100755 --- a/travis/linux_after_success.sh +++ b/travis/linux_after_success.sh @@ -5,20 +5,20 @@ set -e DIST_PATH=dist if [[ "${DIST}" == "trusty" ]]; then - curl \ + travis_retry curl \ --upload-file \ "${DIST_PATH}"/flameshot_${ARCH}_${VERSION}.${EXTEN} \ "https://transfer.sh/flameshot_${ARCH}_${VERSION}.${EXTEN}" else case "${OS}" in "ubuntu"|"debian") - curl \ + travis_retry curl \ --upload-file \ "${DIST_PATH}"/flameshot_${VERSION}-${DIST}-${ARCH}_${ARCH}.${EXTEN} \ "https://transfer.sh/flameshot_${VERSION}-${DIST}-${ARCH}_${ARCH}.${EXTEN}" ;; "fedora") - curl \ + travis_retry curl \ --upload-file \ "${DIST_PATH}"/flameshot_${VERSION}-fedora${DIST}-${ARCH}_${ARCH}.${EXTEN} \ "https://transfer.sh/flameshot_${VERSION}-fedora${DIST}-${ARCH}_${ARCH}.${EXTEN}" diff --git a/travis/linux_before_install.sh b/travis/linux_before_install.sh index e8810aec..f6bfcebc 100755 --- a/travis/linux_before_install.sh +++ b/travis/linux_before_install.sh @@ -3,12 +3,12 @@ set -e if [[ "${DIST}" == "trusty" ]]; then - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo add-apt-repository -y ppa:beineri/opt-qt532-trusty - sudo apt-get -qq update + travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + travis_retry sudo add-apt-repository -y ppa:beineri/opt-qt532-trusty + travis_retry sudo apt-get -qq update # Get linuxdeployqt tool - wget \ + travis_retry wget \ -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" \ -O linuxdeployqt chmod +x linuxdeployqt diff --git a/travis/linux_install.sh b/travis/linux_install.sh index 52ede423..d712c7b6 100755 --- a/travis/linux_install.sh +++ b/travis/linux_install.sh @@ -3,25 +3,25 @@ set -e if [[ "${DIST}" == "trusty" ]]; then - sudo apt-get install -qq build-essential git + travis_retry sudo apt-get install -qq build-essential git - sudo -E apt-get -yq \ + travis_retry sudo -E apt-get -yq \ --no-install-suggests --no-install-recommends --force-yes \ install openssl libssl-dev - #sudo -E apt-get -yq \ + #travis_retry sudo -E apt-get -yq \ # --no-install-suggests --no-install-recommends --force-yes \ # install libgl1-mesa-dev - sudo -E apt-get -yq \ + travis_retry sudo -E apt-get -yq \ --no-install-suggests --no-install-recommends --force-yes \ install tree - sudo apt-get install -qq gcc-4.9 g++-4.9 + travis_retry sudo apt-get install -qq gcc-4.9 g++-4.9 # Install qt5.3.2 - sudo apt-get -y install qt53base qt53tools qt53svg + travis_retry sudo apt-get -y install qt53base qt53tools qt53svg # Install fcitx-frontend-qt5 - sudo apt-get -y install fcitx-frontend-qt5 + travis_retry sudo apt-get -y install fcitx-frontend-qt5 fi diff --git a/travis/linux_script.sh b/travis/linux_script.sh index 855fb383..40f9f7c6 100755 --- a/travis/linux_script.sh +++ b/travis/linux_script.sh @@ -111,8 +111,8 @@ if [[ "${DIST}" == "trusty" ]]; then "${DIST_PATH}"/flameshot_${ARCH}_${VERSION}.${EXTEN} pwd else - git clone https://github.com/packpack/packpack.git - packpack/packpack + travis_retry git clone https://github.com/packpack/packpack.git + travis_retry packpack/packpack pwd && ls case "${OS}" in