[gnome-games] data: Validate desktop file and appdata
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] data: Validate desktop file and appdata
- Date: Tue, 11 Dec 2018 11:02:17 +0000 (UTC)
commit ed8ce35bf35337076862f0a67ade542be6234b04
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Tue Dec 11 09:59:51 2018 +0000
data: Validate desktop file and appdata
data/meson.build | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 0e7e5d88..4c87a4fe 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -6,7 +6,7 @@ resources = gnome.compile_resources(
desktop_conf = configuration_data()
desktop_conf.set('icon', application_id)
-i18n.merge_file ('desktop-file',
+desktop_file = i18n.merge_file ('desktop-file',
type: 'desktop',
input: configure_file(
input: files('org.gnome.Games.desktop.in.in'),
@@ -19,9 +19,20 @@ i18n.merge_file ('desktop-file',
install_dir: join_paths (datadir, 'applications')
)
+desktop_file_validate = find_program('desktop-file-validate', required: false)
+if desktop_file_validate.found()
+ test(
+ 'validate-desktop',
+ desktop_file_validate,
+ args: [
+ desktop_file.full_path()
+ ]
+ )
+endif
+
appdata_conf = configuration_data()
appdata_conf.set('appid', application_id)
-i18n.merge_file ('appdata-file',
+appdata_file = i18n.merge_file ('appdata-file',
input: configure_file(
input: files('org.gnome.Games.appdata.xml.in.in'),
output: 'org.gnome.Games.appdata.xml.in',
@@ -33,6 +44,16 @@ i18n.merge_file ('appdata-file',
install_dir: join_paths (datadir, 'metainfo')
)
+appstream_util = find_program('appstream-util', required: false)
+if appstream_util.found()
+ test(
+ 'validate-appdata', appstream_util,
+ args: [
+ 'validate-relax', appdata_file.full_path()
+ ]
+ )
+endif
+
gsettings_conf = configuration_data ()
gsettings_conf.set ('GETTEXT_PACKAGE', meson.project_name ())
configure_file (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]