Merge branch 'spelling-versionCode-versionName' into 'master'

standardize on versionCode/versionName as spelling

See merge request fdroid/fdroidserver!1699
This commit is contained in:
Hans-Christoph Steiner 2025-09-17 07:08:00 +00:00
commit a9856cfb92
5 changed files with 20 additions and 20 deletions

View file

@ -93,7 +93,7 @@ def check_http(app: metadata.App) -> tuple[Optional[str], Optional[int]]:
m = re.search(codeex, page)
if not m:
raise FDroidException("No RE match for version code")
raise FDroidException("No RE match for versionCode")
vercode = common.version_code_string_to_int(m.group(1).strip())
if urlver != '.':
@ -213,7 +213,7 @@ def check_tags(app: metadata.App, pattern: str) -> tuple[str, int, str]:
if codeex:
m = re.search(codeex, filecontent)
if not m:
logging.debug(f"UpdateCheckData regex {codeex} for version code"
logging.debug(f"UpdateCheckData regex {codeex} for versionCode"
f" has no match in tag {tag}")
continue
@ -233,7 +233,7 @@ def check_tags(app: metadata.App, pattern: str) -> tuple[str, int, str]:
if verex:
m = re.search(verex, filecontent)
if not m:
logging.debug(f"UpdateCheckData regex {verex} for version name"
logging.debug(f"UpdateCheckData regex {verex} for versionName"
f" has no match in tag {tag}")
continue

View file

@ -1098,7 +1098,7 @@ def get_metadata_files(vercodes):
Parameters
----------
vercodes
version codes as returned by read_pkg_args()
versionCodes as returned by read_pkg_args()
Returns
-------
@ -2211,7 +2211,7 @@ def parse_androidmanifests(paths, app):
version = matches
else:
# If build.gradle contains applicationNameSuffix add it to the end of version name
# If build.gradle contains applicationNameSuffix add it to the end of versionName
matches = vnssearch_g(line)
if matches and temp_version_name:
name_suffix = matches.group(2)
@ -2294,8 +2294,8 @@ def parse_androidmanifests(paths, app):
logging.debug("..got package={0}, version={1}, vercode={2}"
.format(package, version, vercode))
# Always grab the package name and version name in case they are not
# together with the highest version code
# Always grab the package name and versionName in case they are not
# together with the highest versionCode
if max_package is None and package is not None:
max_package = package
if max_version is None and version is not None:
@ -2608,9 +2608,9 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
# Remove forced debuggable flags
remove_debuggable_flags(root_dir)
# Insert version code and number into the manifest if necessary
# Insert versionCode and number into the manifest if necessary
if build.forceversion:
logging.info("Changing the version name")
logging.info("Changing the versionName")
for path in manifest_paths(root_dir, flavors):
if not os.path.isfile(path):
continue
@ -2624,7 +2624,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
path)
if build.forcevercode:
logging.info("Changing the version code")
logging.info("Changing the versionCode")
for path in manifest_paths(root_dir, flavors):
if not path.is_file():
continue
@ -2949,8 +2949,8 @@ def get_apk_id(apkfile):
Returns
-------
appid
version code
version name
versionCode
versionName
"""
try:
@ -3564,7 +3564,7 @@ def metadata_find_signing_files(appid, vercode):
appid
app id string
vercode
app version code
app versionCode
Returns
-------
@ -4426,7 +4426,7 @@ def string_is_integer(string):
def version_code_string_to_int(vercode):
"""Convert an version code string of any base into an int."""
"""Convert an versionCode string of any base into an int."""
# TODO: Python 3.6 allows underscores in numeric literals
vercode = vercode.replace('_', '')
try:

View file

@ -352,9 +352,9 @@ def main():
if not appid:
raise FDroidException(_("Couldn't find Application ID"))
if not versionName:
logging.warning(_('Could not find latest version name'))
logging.warning(_('Could not find latest versionName'))
if not versionCode:
logging.warning(_('Could not find latest version code'))
logging.warning(_('Could not find latest versionCode'))
else:
raise FDroidException(_("No gradle project could be found. Specify --subdir?"))

View file

@ -372,7 +372,7 @@ def check_update_check_data_int(app): # noqa: D403
# codeex can be empty as well
if codeex and not versioncode_check_pattern.search(codeex):
yield _(
f'UpdateCheckData must match the version code as integer (\\d or [0-9]): {codeex}'
f'UpdateCheckData must match the versionCode as integer (\\d or [0-9]): {codeex}'
)

View file

@ -511,7 +511,7 @@ def insert_obbs(repodir, apps, apks):
obbWarnDelete(f, _('OBB filename must start with "main." or "patch.":'))
continue
if not re.match(r'^-?[0-9]+$', chunks[1]):
obbWarnDelete(f, _('The OBB version code must come after "{name}.":')
obbWarnDelete(f, _('The OBB versionCode must come after "{name}.":')
.format(name=chunks[0]))
continue
versionCode = int(chunks[1])
@ -550,7 +550,7 @@ VERSION_STRING_RE = re.compile(r'^([0-9]+)\.([0-9]+)\.([0-9]+)$')
def version_string_to_int(version):
"""
Convert sermver version designation to version code.
Convert semantic version designation to versionCode.
Approximately convert a [Major].[Minor].[Patch] version string
consisting of numeric characters (0-9) and periods to a number. The
@ -2322,7 +2322,7 @@ def archive_old_apks(apps, apks, archapks, repodir, archivedir, defaultkeepversi
continue
apkList.append(apk)
# Sort the apk list by version code. First is highest/newest.
# Sort the apk list by versionCode. First is highest/newest.
sorted_list = sorted(apkList, key=lambda apk: apk['versionCode'], reverse=True)
if currentVersionApk:
# Insert apk which corresponds to currentVersion at the front