Skip to content

Commit f4e7d7f

Browse files
authored
Try to get the last tag.
1 parent 272be10 commit f4e7d7f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ notifications:
4444
on_error: always
4545

4646
before_script:
47-
# Expand the git tree back to alpha 2 so we get intermediate tags
48-
- git fetch --shallow-exclude=4.0.0-alpha.2
47+
# Expand the git tree back to the last tag.
48+
- LAST_TAG=`git ls-remote --quiet --tags --sort=version:refname | egrep -o "refs/tags/[0-9]+.*\$" | tail -n 1`
49+
- git fetch --shallow-exclude=$LAST_TAG
50+
- git fetch --depth 1 $LAST_TAG
4951
- git describe --dirty --always --tags
5052
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
5153
- sudo dpkg --add-architecture i386

0 commit comments

Comments
 (0)