The repository of older versions of applications from the main demo repository.
"""
+# `fdroid update` will create a link to the current version of a given app.
+# This provides a static path to the current APK. To disable the creation of
+# this link, uncomment this:
+# make_current_version_link = False
+
+# By default, the "current version" link will be based on the "Name" of the
+# app from the metadata. You can change it to use a different field from the
+# metadata here:
+# current_version_name_source = 'id'
# The ID of a GPG key for making detached signatures for apks. Optional.
# gpgkey = '1DBA2E89'
'mvn3': "mvn",
'gradle': 'gradle',
'sync_from_local_copy_dir': False,
+ 'make_current_version_link': True,
+ 'current_version_name_source': 'Name',
'update_stats': False,
'stats_ignore': [],
'stats_server': None,
apklist[i]['apkname'], apklist[i + 1]['apkname']))
sys.exit(1)
+ current_version_code = 0
+ current_version_file = None
for apk in apklist:
+ # find the APK for the "Current Version"
+ if current_version_code < apk['versioncode']:
+ current_version_code = apk['versioncode']
+ if current_version_code < int(app['Current Version Code']):
+ current_version_file = apk['apkname']
+
apkel = doc.createElement("package")
apel.appendChild(apkel)
addElement('version', apk['version'], doc, apkel)
if len(apk['features']) > 0:
addElement('features', ','.join(apk['features']), doc, apkel)
+ if current_version_file is not None \
+ and config['make_current_version_link'] \
+ and repodir == 'repo': # only create these
+ apklinkname = app[config['current_version_name_source']] + '.apk'
+ if os.path.exists(apklinkname):
+ os.remove(apklinkname)
+ os.symlink(os.path.join(repodir, current_version_file), apklinkname)
+
of = open(os.path.join(repodir, 'index.xml'), 'wb')
if options.pretty:
output = doc.toprettyxml()