From 62c52ad65a4a51b2b529534a94bdeed16cd4369d Mon Sep 17 00:00:00 2001 From: Vesa Karvonen Date: Sat, 10 Aug 2019 11:12:06 +0300 Subject: [PATCH] Attempt to work around legacy git --- .travis.yml | 3 ++- travis-ci | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4049544..17c18e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,8 @@ git: before_install: - export -f travis_nanoseconds travis_time_start travis_time_finish + - export GIT_DEPTH=$(if [ 002021000 -le $(git --version | sed -e 's#[^0-9.]*##g' -e 's#\([0-9]*\)#00\1#g' -e 's#[0-9]*\([0-9]\{3\}\)\.*#\1#g') ]; then echo '--depth 1'; fi) script: - - if ! [ -x .cppsm/travis-ci ]; then git submodule --quiet update --init --no-recommend-shallow --depth 1 .cppsm; fi + - if ! [ -x .cppsm/travis-ci ]; then git submodule --quiet update --init --no-recommend-shallow $GIT_DEPTH .cppsm; fi - .cppsm/travis-ci diff --git a/travis-ci b/travis-ci index a841dd5..0ce3c8d 100755 --- a/travis-ci +++ b/travis-ci @@ -55,7 +55,7 @@ folded() { echo -e "\ntravis_fold:end:cppsm.$FOLD\r" } -folded ... concurrently GIT_UPDATE_PID git submodule update --init --depth 1 --jobs "$N_PARALLEL_UPDATE" +folded ... concurrently GIT_UPDATE_PID git submodule update --init $GIT_DEPTH --jobs "$N_PARALLEL_UPDATE" if [ "$TRAVIS_OS_NAME" = linux ]; then folded ... concurrently LIBSTD_INSTALL_PID locked bash -c 'sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test && sudo -E apt-get -yq update && sudo -E apt-get -yq --no-install-suggests --no-install-recommends install libstdc++-8-dev'