mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Use a numeric version check for upgrades.
This commit is contained in:
parent
f783aeac63
commit
a014cf82a1
@ -22,6 +22,14 @@ from logging import *
|
||||
APP_NAME = 'pgAdmin 4'
|
||||
APP_ICON = 'icon-postgres-alt'
|
||||
|
||||
##########################################################################
|
||||
# Application settings
|
||||
##########################################################################
|
||||
|
||||
# NOTE!!!
|
||||
# If you change any of APP_RELEASE, APP_REVISION or APP_SUFFIX, then you
|
||||
# must also change APP_VERSION_INT to match.
|
||||
|
||||
# Application version number components
|
||||
APP_RELEASE = 1
|
||||
APP_REVISION = 0
|
||||
@ -30,9 +38,22 @@ APP_REVISION = 0
|
||||
# for GA releases.
|
||||
APP_SUFFIX = 'beta3'
|
||||
|
||||
# Numeric application version for upgrade checks. Should be in the format:
|
||||
# [X]XYYZZ, where X is the release version, Y is the revision, with a leading
|
||||
# zero if needed, and Z represents the suffix, with a leading zero if needed
|
||||
APP_VERSION_INT = 10003
|
||||
|
||||
# DO NOT CHANGE!
|
||||
# The application version string, constructed from the components
|
||||
APP_VERSION = '%s.%s-%s' % (APP_RELEASE, APP_REVISION, APP_SUFFIX)
|
||||
|
||||
# Copyright string for display in the app
|
||||
APP_COPYRIGHT = 'Copyright 2013 - 2016, The pgAdmin Development Team'
|
||||
|
||||
##########################################################################
|
||||
# Misc stuff
|
||||
##########################################################################
|
||||
|
||||
# Path to the online help.
|
||||
HELP_PATH = '../../../docs/en_US/_build/html/'
|
||||
|
||||
@ -42,10 +63,6 @@ LANGUAGES = {
|
||||
'fr': 'Français'
|
||||
}
|
||||
|
||||
# DO NOT CHANGE!
|
||||
# The application version string, constructed from the components
|
||||
APP_VERSION = '%s.%s-%s' % (APP_RELEASE, APP_REVISION, APP_SUFFIX)
|
||||
|
||||
# DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING!
|
||||
# List of modules to skip when dynamically loading
|
||||
MODULE_BLACKLIST = ['test']
|
||||
|
@ -462,7 +462,7 @@ def index():
|
||||
pass
|
||||
|
||||
if data is not None:
|
||||
if data['pgadmin4']['version'] != config.APP_VERSION:
|
||||
if data['pgadmin4']['version_int'] > config.APP_VERSION_INT:
|
||||
msg = render_template(
|
||||
MODULE_NAME + "/upgrade.html",
|
||||
current_version=config.APP_VERSION,
|
||||
|
Loading…
Reference in New Issue
Block a user