mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
Update with suggestions
This commit is contained in:
parent
7d06608531
commit
e3d319f30b
@ -102,7 +102,7 @@ STRICT_APPLICATION_ID_REGEX = re.compile(r'''(?:^[a-zA-Z]+(?:\d*[a-zA-Z_]*)*)(?:
|
|||||||
VALID_APPLICATION_ID_REGEX = re.compile(r'''(?:^[a-z_]+(?:\d*[a-zA-Z_]*)*)(?:\.[a-z_]+(?:\d*[a-zA-Z_]*)*)*$''',
|
VALID_APPLICATION_ID_REGEX = re.compile(r'''(?:^[a-z_]+(?:\d*[a-zA-Z_]*)*)(?:\.[a-z_]+(?:\d*[a-zA-Z_]*)*)*$''',
|
||||||
re.IGNORECASE)
|
re.IGNORECASE)
|
||||||
ANDROID_PLUGIN_REGEX = re.compile(r'''\s*(:?apply plugin:|id)\(?\s*['"](android|com\.android\.application)['"]\s*\)?''')
|
ANDROID_PLUGIN_REGEX = re.compile(r'''\s*(:?apply plugin:|id)\(?\s*['"](android|com\.android\.application)['"]\s*\)?''')
|
||||||
APPLE_BUNDLEiDENTIFIER_REGEX = re.compile(r'''^[a-zA-Z-.]*''')
|
APPLE_BUNDLEIDENTIFIER_REGEX = re.compile(r'''^[a-zA-Z-.]*''')
|
||||||
|
|
||||||
SETTINGS_GRADLE_REGEX = re.compile(r'settings\.gradle(?:\.kts)?')
|
SETTINGS_GRADLE_REGEX = re.compile(r'settings\.gradle(?:\.kts)?')
|
||||||
GRADLE_SUBPROJECT_REGEX = re.compile(r'''['"]:?([^'"]+)['"]''')
|
GRADLE_SUBPROJECT_REGEX = re.compile(r'''['"]:?([^'"]+)['"]''')
|
||||||
@ -2016,7 +2016,7 @@ def is_valid_package_name(name):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
return VALID_APPLICATION_ID_REGEX.match(name) is not None \
|
return VALID_APPLICATION_ID_REGEX.match(name) is not None \
|
||||||
or APPLE_BUNDLEiDENTIFIER_REGEX.match(name) is not None \
|
or APPLE_BUNDLEIDENTIFIER_REGEX.match(name) is not None \
|
||||||
or FDROID_PACKAGE_NAME_REGEX.match(name) is not None
|
or FDROID_PACKAGE_NAME_REGEX.match(name) is not None
|
||||||
|
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ def insert_obbs(repodir, apps, apks):
|
|||||||
def version_string_to_int(version):
|
def version_string_to_int(version):
|
||||||
"""Approximately convert a [Major].[Minor].[Patch] version string
|
"""Approximately convert a [Major].[Minor].[Patch] version string
|
||||||
consisting of numeric characters (0-9) and periods to a number. The
|
consisting of numeric characters (0-9) and periods to a number. The
|
||||||
exponents are chosen such that it still fits in the 64bit index.yaml range.
|
exponents are chosen such that it still fits in the 64bit JSON/Android range.
|
||||||
"""
|
"""
|
||||||
version = version.split('.')
|
version = version.split('.')
|
||||||
major = int(version.pop(0)) if version else 0
|
major = int(version.pop(0)) if version else 0
|
||||||
|
Loading…
Reference in New Issue
Block a user