diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2018-11-27 23:59:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-27 23:59:02 -0800 |
| commit | f4e7d7fbb4ded93b7c2b9542d41ef160b9154d53 (patch) | |
| tree | 5bd0f25d1d1d30d3188628d506f0569183b97226 | |
| parent | 272be109140d9dda7697337de900e3afd8d90754 (diff) | |
Try to get the last tag.
| -rwxr-xr-x | .travis.yml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index fcf5ca433..09dab9ef3 100755 --- a/.travis.yml +++ b/.travis.yml @@ -44,8 +44,10 @@ notifications: on_error: always before_script: - # Expand the git tree back to alpha 2 so we get intermediate tags - - git fetch --shallow-exclude=4.0.0-alpha.2 + # Expand the git tree back to the last tag. + - LAST_TAG=`git ls-remote --quiet --tags --sort=version:refname | egrep -o "refs/tags/[0-9]+.*\$" | tail -n 1` + - git fetch --shallow-exclude=$LAST_TAG + - git fetch --depth 1 $LAST_TAG - git describe --dirty --always --tags - function var_search () { case "$1" in *$2*) true;; *) false;; esac; } - sudo dpkg --add-architecture i386 |
