Skip to content

Commit 39ebe97

Browse files
committed
Don't assume git version has just three numbers
1 parent b004a5b commit 39ebe97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ 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.]*##g' -e 's#\([0-9]*\)#00\1#g' -e 's#[0-9]*\([0-9]\{3\}\)\.*#\1#g') ]; then echo '--depth 1'; fi)
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)
2121

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

0 commit comments

Comments
 (0)