Skip to content

Commit 45661a2

Browse files
committed
Attempt to work around legacy git
1 parent 3653c94 commit 45661a2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ git:
1717

1818
before_install:
1919
- export -f travis_nanoseconds travis_time_start travis_time_finish
20+
- export GIT_DEPTH=$(if [ 002022000 -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)
2021

2122
script:
22-
- if ! [ -x .cppsm/travis-ci ]; then git submodule --quiet update --init --no-recommend-shallow --depth 1 .cppsm; fi
23+
- if ! [ -x .cppsm/travis-ci ]; then git submodule --quiet update --init --no-recommend-shallow $GIT_DEPTH .cppsm; fi
2324
- .cppsm/travis-ci

travis-ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ folded() {
5555
echo -e "\ntravis_fold:end:cppsm.$FOLD\r"
5656
}
5757

58-
folded ... concurrently GIT_UPDATE_PID git submodule update --init --depth 1 --jobs "$N_PARALLEL_UPDATE"
58+
folded ... concurrently GIT_UPDATE_PID git submodule update --init $GIT_DEPTH --jobs "$N_PARALLEL_UPDATE"
5959

6060
if [ "$TRAVIS_OS_NAME" = linux ]; then
6161
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'

0 commit comments

Comments
 (0)