Skip to content

Commit

Permalink
Add human-readable name & summary to Flatpak manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
wjt committed Nov 10, 2023
1 parent 025ef88 commit 7ea457c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion hooks/image/70-flatpak-manifest
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_data_for_ref(
date = commit_date_string(repo, commit)
version = installed_ref.get_appdata_version()

return key, {
data = {
'name': name,
'arch': arch,
'branch': branch,
Expand All @@ -61,6 +61,20 @@ def get_data_for_ref(
'version': version,
}

# TODO: It would be nice to consider EIB_FLATPAK_LOCALES and extract the
# name and summary in those locales too. Unfortunately while there is
# internal API to do this easily, it is not exposed by libflatpak.
appdata_name = installed_ref.get_appdata_name()
appdata_summary = installed_ref.get_appdata_summary()
if appdata_name or appdata_summary:
data['appdata'] = {'C': {}}
if appdata_name:
data['appdata']['C']['name'] = appdata_name
if appdata_summary:
data['appdata']['C']['summary'] = appdata_summary

return key, data


def main():
# Build the json data structure
Expand Down

0 comments on commit 7ea457c

Please sign in to comment.