From df3a3c77ebd8ab13aba210252d60db53a0f31c90 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Tue, 25 Aug 2015 19:42:07 +0100 Subject: [PATCH] Fix travis build version issue * version.py script requires git tags but detached HEAD in travis clone requires manually creating the RELEASE-VERSION. * Also fix relative path issue building docs. --- .travis.yml | 1 + docs/source/conf.py | 2 -- version.py | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 version.py diff --git a/.travis.yml b/.travis.yml index 63cade1f0..3dfff3250 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,7 @@ before_script: - export PYTHONPATH=$PYTHONPATH:$PWD - python -c "import libtorrent as lt; print lt.version" - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" + - echo '2.0.0.dev0' > RELEASE-VERSION script: - bash -c "echo $DISPLAY" diff --git a/docs/source/conf.py b/docs/source/conf.py index 87d80cf4f..3e38cf9e6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -85,8 +85,6 @@ copyright = '2008-%s, Deluge Team' % current_year # The short X.Y version. if get_version: version = get_version(prefix='deluge-', suffix='.dev0') - # remove the created file by get_version - os.remove('RELEASE-VERSION') else: version = pkg_resources.require("Deluge")[0].version # The full version, including alpha/beta/rc tags. diff --git a/version.py b/version.py old mode 100644 new mode 100755 index fe24870e8..61decd5ec --- a/version.py +++ b/version.py @@ -33,9 +33,10 @@ __all__ = ("get_version") +import os from subprocess import PIPE, Popen -VERSION_FILE = "RELEASE-VERSION" +VERSION_FILE = os.path.join(os.path.dirname(__file__), "RELEASE-VERSION") def call_git_describe(prefix="", suffix=""):