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.
This commit is contained in:
Calum Lind 2015-08-25 19:42:07 +01:00
parent a3073c44e2
commit df3a3c77eb
3 changed files with 3 additions and 3 deletions

View File

@ -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"

View File

@ -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.

3
version.py Normal file → Executable file
View File

@ -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=""):