diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-12-10 12:52:16 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-12-10 12:52:16 +0100 |
commit | e300ea6a372bee756783c96ae87f9228f2ae8b86 (patch) | |
tree | afea2719221e09aef28e79d0d34c2e7cbff9944d | |
parent | a4fb9e1c52c9091c9a69a4f1091b06e0b21e188d (diff) | |
download | ghdl-e300ea6a372bee756783c96ae87f9228f2ae8b86.tar.gz ghdl-e300ea6a372bee756783c96ae87f9228f2ae8b86.tar.bz2 ghdl-e300ea6a372bee756783c96ae87f9228f2ae8b86.zip |
travis-ci: tentatively fix git --describe for version.
-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 |