From 260d55aeaed335f7efaba1533d1c35e6e4bd21e1 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 22 May 2019 12:12:46 +0100 Subject: [PATCH] [Travis] Fix getting version from git tags Travis clones the git repo with a shallow depth and the git describe command cannot find the version tag. Setting depth to 1000 should be enough but can be increased if required. Refs: https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth https://stackoverflow.com/a/51727114/175584 --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f9a0fcc21..c099c7f50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,10 @@ env: global: - DISPLAY=:99.0 +git: + # Set greater depth to get version from tags. + depth: 1000 + matrix: include: - name: Unit tests - Python 2 @@ -68,8 +72,6 @@ before_script: --make-pidfile --pidfile /tmp/custom_xvfb_99.pid \ --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16; fi" - # Create missing version file - - echo "2.0.0.dev0" > RELEASE-VERSION script: - tox -e $TOX_ENV