Skip to content

Commit e83db2c

Browse files
committed
Upgrade git on Windows
Unfortunately git support for submodules, shallow and/or depth limited cloning has improved in recent git versions and the Travis Windows image has an old version of git.
1 parent dfb5c4f commit e83db2c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.travis.yml

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

1818
before_install:
1919
- export -f travis_nanoseconds travis_time_start travis_time_finish
20-
- export GIT_DEPTH=$(if [ 002021000 -le $(git --version | sed -e 's#^[^0-9]*\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$#00\1.00\2.00\3#g' -e 's#[0-9]*\([0-9]\{3\}\)\.*#\1#g') ]; then echo '--depth 1'; fi)
20+
- if [ "$TRAVIS_OS_NAME" = windows ]; then choco upgrade -y git.install; fi
2121

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

travis-ci

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

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

6868
if [ "$TRAVIS_OS_NAME" = linux ]; then
6969
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)