mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-08 18:31:07 +03:00
update: fix fastlane scraping, it uses a subdir called 'images'
https://commons.wikimedia.org/wiki/File:GetChromium_FeatureGraphic_1024x500.png
This commit is contained in:
parent
77a65be9db
commit
c348186ad6
5 changed files with 19 additions and 6 deletions
|
@ -676,14 +676,14 @@ def insert_localized_app_metadata(apps):
|
|||
must be PNG or JPEG files ending with ".png", ".jpg", or ".jpeg"
|
||||
and must be in the following layout:
|
||||
# TODO replace these docs with link to All_About_Descriptions_Graphics_and_Screenshots
|
||||
# TODO mention that the 'localized' section is not in metadata.yml, so key names are like Java vars: camelCase with first letter lowercase.
|
||||
|
||||
repo/packageName/locale/featureGraphic.png
|
||||
repo/packageName/locale/phoneScreenshots/1.png
|
||||
repo/packageName/locale/phoneScreenshots/2.png
|
||||
|
||||
The changelog files must be text files named with the versionCode
|
||||
ending with ".txt" and must be in the following layout:
|
||||
https://github.com/fastlane/fastlane/blob/1.109.0/supply/README.md#changelogs-whats-new
|
||||
https://github.com/fastlane/fastlane/blob/2.28.7/supply/README.md#changelogs-whats-new
|
||||
|
||||
repo/packageName/locale/changelogs/12345.txt
|
||||
|
||||
|
@ -701,7 +701,7 @@ def insert_localized_app_metadata(apps):
|
|||
metadata/ folder and the apps' source repos for standard locations
|
||||
of graphic and screenshot files. If it finds them, it will copy
|
||||
them into the repo. The fastlane files follow this pattern:
|
||||
https://github.com/fastlane/fastlane/blob/1.109.0/supply/README.md#images-and-screenshots
|
||||
https://github.com/fastlane/fastlane/blob/2.28.7/supply/README.md#images-and-screenshots
|
||||
|
||||
"""
|
||||
|
||||
|
@ -718,7 +718,6 @@ def insert_localized_app_metadata(apps):
|
|||
logging.debug(packageName + ' does not have app metadata, skipping l18n scan.')
|
||||
continue
|
||||
locale = segments[-1]
|
||||
destdir = os.path.join('repo', packageName, locale)
|
||||
for f in files:
|
||||
if f == 'full_description.txt':
|
||||
_set_localized_text_entry(apps[packageName], locale, 'description',
|
||||
|
@ -737,11 +736,15 @@ def insert_localized_app_metadata(apps):
|
|||
os.path.join(root, f))
|
||||
continue
|
||||
elif f == str(apps[packageName]['CurrentVersionCode']) + '.txt':
|
||||
_set_localized_text_entry(apps[packageName], segments[-2], 'whatsNew',
|
||||
locale = segments[-2]
|
||||
_set_localized_text_entry(apps[packageName], locale, 'whatsNew',
|
||||
os.path.join(root, f))
|
||||
continue
|
||||
|
||||
base, extension = common.get_extension(f)
|
||||
if locale == 'images':
|
||||
locale = segments[-2]
|
||||
destdir = os.path.join('repo', packageName, locale)
|
||||
if base in GRAPHIC_NAMES and extension in ALLOWED_EXTENSIONS:
|
||||
os.makedirs(destdir, mode=0o755, exist_ok=True)
|
||||
logging.debug('copying ' + os.path.join(root, f) + ' ' + destdir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue