mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
Add "Update Check Name" for Tags/RM apps that programmatically change their appid
This commit is contained in:
parent
167d9df3a0
commit
0b50566f0f
2 changed files with 13 additions and 8 deletions
|
|
@ -89,6 +89,7 @@ def check_tags(app, pattern):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
appid = app['Update Check Name'] if app['Update Check Name'] else app['id']
|
||||||
if app['Repo Type'] == 'srclib':
|
if app['Repo Type'] == 'srclib':
|
||||||
build_dir = os.path.join('build', 'srclib', app['Repo'])
|
build_dir = os.path.join('build', 'srclib', app['Repo'])
|
||||||
repotype = common.getsrclibvcs(app['Repo'])
|
repotype = common.getsrclibvcs(app['Repo'])
|
||||||
|
|
@ -127,13 +128,15 @@ def check_tags(app, pattern):
|
||||||
# Only process tags where the manifest exists...
|
# Only process tags where the manifest exists...
|
||||||
paths = common.manifest_paths(build_dir, flavour)
|
paths = common.manifest_paths(build_dir, flavour)
|
||||||
version, vercode, package = common.parse_androidmanifests(paths)
|
version, vercode, package = common.parse_androidmanifests(paths)
|
||||||
if package and package == app['id'] and version and vercode:
|
if not package or package != appid or not version or not vercode:
|
||||||
logging.debug("Manifest exists. Found version {0} ({1})".format(
|
continue
|
||||||
version, vercode))
|
|
||||||
if int(vercode) > int(hcode):
|
logging.debug("Manifest exists. Found version {0} ({1})".format(
|
||||||
htag = tag
|
version, vercode))
|
||||||
hcode = str(int(vercode))
|
if int(vercode) > int(hcode):
|
||||||
hver = version
|
htag = tag
|
||||||
|
hcode = str(int(vercode))
|
||||||
|
hver = version
|
||||||
|
|
||||||
if hver:
|
if hver:
|
||||||
return (hver, hcode, htag)
|
return (hver, hcode, htag)
|
||||||
|
|
@ -159,6 +162,7 @@ def check_repomanifest(app, branch=None):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
appid = app['Update Check Name'] if 'Update Check Name' in app else app['id']
|
||||||
if app['Repo Type'] == 'srclib':
|
if app['Repo Type'] == 'srclib':
|
||||||
build_dir = os.path.join('build', 'srclib', app['Repo'])
|
build_dir = os.path.join('build', 'srclib', app['Repo'])
|
||||||
repotype = common.getsrclibvcs(app['Repo'])
|
repotype = common.getsrclibvcs(app['Repo'])
|
||||||
|
|
@ -198,7 +202,7 @@ def check_repomanifest(app, branch=None):
|
||||||
version, vercode, package = common.parse_androidmanifests(paths)
|
version, vercode, package = common.parse_androidmanifests(paths)
|
||||||
if not package:
|
if not package:
|
||||||
return (None, "Couldn't find package ID")
|
return (None, "Couldn't find package ID")
|
||||||
if package != app['id']:
|
if package != appid:
|
||||||
return (None, "Package ID mismatch")
|
return (None, "Package ID mismatch")
|
||||||
if not version:
|
if not version:
|
||||||
return (None,"Couldn't find latest version name")
|
return (None,"Couldn't find latest version name")
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ app_defaults = {
|
||||||
'AntiFeatures': None,
|
'AntiFeatures': None,
|
||||||
'Archive Policy': None,
|
'Archive Policy': None,
|
||||||
'Update Check Mode': 'None',
|
'Update Check Mode': 'None',
|
||||||
|
'Update Check Name': None,
|
||||||
'Update Check Data': None,
|
'Update Check Data': None,
|
||||||
'Vercode Operation': None,
|
'Vercode Operation': None,
|
||||||
'Auto Update Mode': 'None',
|
'Auto Update Mode': 'None',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue