Make Version setuptools compatible and still have the "Beta" in the User interface

pull/2997/head
Ozzie Isaacs 5 months ago
parent 2334e8f9c9
commit d341faf204

@ -49,9 +49,9 @@ sorted_modules = OrderedDict((sorted(modules.items(), key=lambda x: x[0].casefol
def collect_stats(): def collect_stats():
if constants.NIGHTLY_VERSION[0] == "$Format:%H$": if constants.NIGHTLY_VERSION[0] == "$Format:%H$":
calibre_web_version = constants.STABLE_VERSION['version'] calibre_web_version = constants.STABLE_VERSION['version'].replace("b", " Beta")
else: else:
calibre_web_version = (constants.STABLE_VERSION['version'] + ' - ' calibre_web_version = (constants.STABLE_VERSION['version'].replace("b", " Beta") + ' - '
+ constants.NIGHTLY_VERSION[0].replace('%', '%%') + ' - ' + constants.NIGHTLY_VERSION[0].replace('%', '%%') + ' - '
+ constants.NIGHTLY_VERSION[1].replace('%', '%%')) + constants.NIGHTLY_VERSION[1].replace('%', '%%'))

@ -214,7 +214,7 @@ def admin():
form_date += timedelta(hours=int(commit[20:22]), minutes=int(commit[23:])) form_date += timedelta(hours=int(commit[20:22]), minutes=int(commit[23:]))
commit = format_datetime(form_date - tz, format='short') commit = format_datetime(form_date - tz, format='short')
else: else:
commit = version['version'] commit = version['version'].replace("b", " Beta")
all_user = ub.session.query(ub.User).all() all_user = ub.session.query(ub.User).all()
# email_settings = mail_config.get_mail_settings() # email_settings = mail_config.get_mail_settings()

@ -29,8 +29,8 @@ from .constants import DEFAULT_SETTINGS_FILE, DEFAULT_GDRIVE_FILE
def version_info(): def version_info():
if _NIGHTLY_VERSION[1].startswith('$Format'): if _NIGHTLY_VERSION[1].startswith('$Format'):
return "Calibre-Web version: %s - unknown git-clone" % _STABLE_VERSION['version'] return "Calibre-Web version: %s - unknown git-clone" % _STABLE_VERSION['version'].replace("b", " Beta")
return "Calibre-Web version: %s -%s" % (_STABLE_VERSION['version'], _NIGHTLY_VERSION[1]) return "Calibre-Web version: %s -%s" % (_STABLE_VERSION['version'].replace("b", " Beta"), _NIGHTLY_VERSION[1])
class CliParameter(object): class CliParameter(object):

@ -173,7 +173,7 @@ def selected_roles(dictionary):
BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, description, tags, series, ' BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, description, tags, series, '
'series_id, languages, publisher, pubdate, identifiers') 'series_id, languages, publisher, pubdate, identifiers')
STABLE_VERSION = {'version': '0.6.22 Beta'} STABLE_VERSION = {'version': '0.6.22b'}
NIGHTLY_VERSION = dict() NIGHTLY_VERSION = dict()
NIGHTLY_VERSION[0] = '$Format:%H$' NIGHTLY_VERSION[0] = '$Format:%H$'

Loading…
Cancel
Save