Skip to content

Commit ab94344

Browse files
authored
Merge pull request #1360 from adafruit/tannewt-patch-5
Make sure the commit builds include version info
2 parents c47c495 + f13fac0 commit ab94344

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ language: c
44
compiler:
55
- gcc
66
git:
7-
depth: 6
7+
depth: 1
88

99
# Each item under 'env' is a separate Travis job to execute.
1010
# They run in separate environments, so each one must take the time
@@ -44,6 +44,11 @@ notifications:
4444
on_error: always
4545

4646
before_script:
47+
# Expand the git tree back to 4.0.0-alpha.1 and then fetch the latest 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=4.0.0-alpha.1
50+
- git fetch --depth 1 origin $LAST_TAG:$LAST_TAG
51+
- git describe --dirty --always --tags
4752
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
4853
- sudo dpkg --add-architecture i386
4954

0 commit comments

Comments
 (0)