FIX:(#1068) Pages being served showed incorrect branch when running from source

This commit is contained in:
evilhero 2015-06-22 09:33:37 -04:00
parent 6ebf7b2057
commit 1b4db81878
4 changed files with 9 additions and 7 deletions

View File

@ -99,7 +99,7 @@
</div>
<div id="version">
Version: <em>${mylar.CURRENT_VERSION}</em>
%if version.MYLAR_VERSION != 'master':
%if mylar.GIT_BRANCH != 'master':
(${version.MYLAR_VERSION})
%endif
<br/>

View File

@ -940,10 +940,12 @@ def initialize():
else:
hash = "unknown"
if version.MYLAR_VERSION == 'master':
if GIT_BRANCH == 'master':
vers = 'M'
else:
elif GIT_BRANCH == 'development':
vers = 'D'
else:
vers = 'NONE'
USER_AGENT = 'Mylar/' +str(hash) +'(' +vers +') +http://www.github.com/evilhero/mylar/'

View File

@ -16,7 +16,7 @@
import platform, subprocess, re, os, urllib2, tarfile
import mylar
from mylar import logger, version
from mylar import logger
import lib.requests as requests
import re
@ -63,7 +63,7 @@ def runGit(args):
def getVersion():
if version.MYLAR_VERSION.startswith('win32build'):
if mylar.GIT_BRANCH is not None and mylar.GIT_BRANCH.startswith('win32build'):
mylar.INSTALL_TYPE = 'win'

View File

@ -34,7 +34,7 @@ import shutil
import mylar
from mylar import logger, db, importer, mb, search, filechecker, helpers, updater, parseit, weeklypull, PostProcessor, version, librarysync, moveit, Failed, readinglist #,rsscheck
from mylar import logger, db, importer, mb, search, filechecker, helpers, updater, parseit, weeklypull, PostProcessor, librarysync, moveit, Failed, readinglist #,rsscheck
import lib.simplejson as simplejson
@ -3405,7 +3405,7 @@ class WebInterface(object):
"unrar_cmd": mylar.UNRAR_CMD,
"failed_download_handling": helpers.checked(mylar.FAILED_DOWNLOAD_HANDLING),
"failed_auto": helpers.checked(mylar.FAILED_AUTO),
"branch": version.MYLAR_VERSION,
"branch": mylar.GIT_BRANCH,
"br_type": mylar.INSTALL_TYPE,
"br_version": mylar.versioncheck.getVersion()[0],
"py_version": platform.python_version(),