From ef3f14daaafb53cabd645a58baccf78c21e29706 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 17 Jul 2020 11:08:25 +0100 Subject: [PATCH] Define appversion_nobuild in config.py for use elsewhere Already need this in update.py, but will also adjust the 'Release Notes' URL to use this, not full version. --- config.py | 4 +++- update.py | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.py b/config.py index 11ee7498..35280ce2 100644 --- a/config.py +++ b/config.py @@ -11,7 +11,9 @@ appcmdname = 'EDMC' # appversion **MUST** follow Semantic Versioning rules: # # Major.Minor.Patch(-prerelease)(+buildmetadata) -appversion = '4.0.2' +appversion = '4.0.2' #-rc1+a872b5f' +# For some things we want appversion without (possible) +build metadata +appversion_nobuild = appversion.split(sep='+')[0] copyright = u'© 2015-2019 Jonathan Harris, 2020 EDCD' update_feed = 'https://raw.githubusercontent.com/EDCD/EDMarketConnector/releases/edmarketconnector.xml' diff --git a/update.py b/update.py index 8f9e2a73..8b859874 100644 --- a/update.py +++ b/update.py @@ -6,7 +6,7 @@ import threading from traceback import print_exc # ensure registry is set up on Windows before we start -from config import appname, appversion, update_feed, update_interval, config +from config import appname, appversion, appversion_nobuild, update_feed, update_interval, config if not getattr(sys, 'frozen', False): @@ -100,8 +100,7 @@ elif sys.platform=='win32': # NB: It 'accidentally' supports pre-release due to how it # splits and compares strings: # - appversion_nobuildmetadata = appversion.split(sep='+')[0] - self.updater.win_sparkle_set_app_build_version(appversion_nobuildmetadata) + self.updater.win_sparkle_set_app_build_version(appversion_nobuild) # set up shutdown callback global root