[devhelp] Validate the AppStream metadata



commit e1d365a44c201f06a56ae55d17114e5138745bfb
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Jul 9 16:43:21 2021 +0100

    Validate the AppStream metadata
    
    We have to use `validate-relax` because the `validate` command is too
    strict by default, and will choke on our captions and screenshot files.

 data/meson.build | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/data/meson.build b/data/meson.build
index e70735bb..b8d7b555 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -31,6 +31,16 @@ appdata_file = I18N.merge_file(
   install_dir: get_option('datadir') / 'metainfo'
 )
 
+appstream_util = find_program('appstream-util', required: false)
+if appstream_util.found()
+  test('validate-appdata',
+    appstream_util,
+    args: ['validate-relax', appdata_file],
+    workdir: meson.current_build_dir(),
+    depends: appdata_file,
+  )
+endif
+
 desktop_conf = configuration_data()
 desktop_conf.set('application_id', APPLICATION_ID)
 desktop = APPLICATION_ID + '.desktop'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]