diff options
-rw-r--r-- | Makefile.in | 4 | ||||
-rwxr-xr-x | dist/linux/travis-ci.sh | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in index 6244fcdba..5f276adbc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -142,8 +142,8 @@ include $(srcdir)/src/grt/Makefile.inc version.tmp: $(srcdir)/src/version.in force # Create version.tmp from version.in, using git date/hash - if [ -d $(srcdir)/.git ]; then \ - desc=`cd $(srcdir); git describe --dirty`; \ + if test -d $(srcdir)/.git \ + && desc=`cd $(srcdir); git describe --dirty`; then \ $(SED) -e "s/[(].*[)]/($$desc)/" < $< > $@; \ else \ $(CP) $< $@; \ diff --git a/dist/linux/travis-ci.sh b/dist/linux/travis-ci.sh index 659171d12..7dd6e7964 100755 --- a/dist/linux/travis-ci.sh +++ b/dist/linux/travis-ci.sh @@ -14,6 +14,11 @@ printf "$ANSI_YELLOW[TRAVIS] Travis environment $ANSI_NOCOLOR\n" env | grep TRAVIS echo -en "travis_fold:end:travis_env\r" +# Build version.tmp and replace version.in with it (so that the version is +# correctly set). +git fetch --unshallow +make -f Makefile.in srcdir=. version.tmp +cp version.tmp src/version.in # Compute package name |