Draft: new standalone command: fetch_metadata, replacing update functionality.
When I try to add more search path for fastlane metadata, I take the chance to extract the whole function in to a sub command. I'm not sure if the performance will be affected. Before I polish this MR further I want to also get some feedback.
What I have done:
- Break up
copy_triple_t_store_metadata
andinsert_localized_app_metadata
into small functions and classes. - Split the process into two parts. First the text is read and the image path is indexed. Then the images are copied.
- Add more search path for fastlane.
- Currenly both the mtime and size are compared between the images in repo and source. Because we also strip some images these images are always copied again and again. I removed the size check.
- Add a new fetch_metadata subcommand (maybe there is a better name?) so that the metadata structure can be checked easily.
What I haven't done:
- Add an item so that the search path can be specified in build metadata. Is this necessary? Should we support path out of the repo? E.g. another repo or a tarball?
- Clean up leftover images from repo. Currently F-Droid also support adding images into repo directly. How should we decide if the image is leftover?
- If there are images fetched from other path then all other images in repo should be remove.
- Drop this function and ask users to host the images in build dir instead.
- Output the result to a file.
What I want to drop/change:
- Currently fastlane structure in fdroiddata is supported, i.e. short_description.txt, etc. However they are not used and only the custon style, i.e. summary.txt is used.
- The author info from triple-t seems only used by few apps. They can be added to the build metadata directly anyway.
- Description and changelog is not stripped. I don't know if there is any use case to keep the new line and space.