use YAML names for referring to metadata fields in messages

This commit is contained in:
Hans-Christoph Steiner 2020-10-01 11:52:22 +02:00
parent 5e1377c77a
commit b23cf9f8ad
31 changed files with 45 additions and 45 deletions

View file

@ -487,12 +487,12 @@ def checkupdates_app(app):
name = _getappname(app)
ver = _getcvname(app)
logging.info('...updating to version %s' % ver)
commitmsg = 'Update CV of %s to %s' % (name, ver)
commitmsg = 'Update CurrentVersion of %s to %s' % (name, ver)
if options.auto:
mode = app.AutoUpdateMode
if not app.CurrentVersionCode:
logging.warning("Can't auto-update app with no current version code: " + app.id)
logging.warning("Can't auto-update app with no CurrentVersionCode: " + app.id)
elif mode in ('None', 'Static'):
pass
elif mode.startswith('Version '):
@ -502,7 +502,7 @@ def checkupdates_app(app):
try:
suffix, pattern = pattern[1:].split(' ', 1)
except ValueError:
raise MetaDataException("Invalid AUM: " + mode)
raise MetaDataException("Invalid AutoUpdateMode: " + mode)
gotcur = False
latest = None

View file

@ -242,7 +242,7 @@ def check_ucm_tags(app):
and lastbuild.versionCode == app.CurrentVersionCode
and not lastbuild.forcevercode
and any(s in lastbuild.commit for s in '.,_-/')):
yield _("Last used commit '{commit}' looks like a tag, but Update Check Mode is '{ucm}'")\
yield _("Last used commit '{commit}' looks like a tag, but UpdateCheckMode is '{ucm}'")\
.format(commit=lastbuild.commit, ucm=app.UpdateCheckMode)
@ -287,7 +287,7 @@ filling_ucms = re.compile(r'^(Tags.*|RepoManifest.*)')
def check_checkupdates_ran(app):
if filling_ucms.match(app.UpdateCheckMode):
if not app.AutoName and not app.CurrentVersion and app.CurrentVersionCode == '0':
yield _("UCM is set but it looks like checkupdates hasn't been run yet")
yield _("UpdateCheckMode is set but it looks like checkupdates hasn't been run yet")
def check_empty_fields(app):