From f09fac75af185763a06a8ab9b3a9ed2e7229f009 Mon Sep 17 00:00:00 2001
From: Alexandre Trendel
Date: Sun, 24 Jan 2021 12:59:10 +0100
Subject: [PATCH] add appdata validation to tests + fix appdata
---
.github/workflows/spot-main.yml | 2 +-
data/dev.alextren.Spot.appdata.xml | 2 +-
data/meson.build | 15 ++++++++++++---
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/spot-main.yml b/.github/workflows/spot-main.yml
index ee38ed63..88baaad2 100644
--- a/.github/workflows/spot-main.yml
+++ b/.github/workflows/spot-main.yml
@@ -26,7 +26,7 @@ jobs:
- name: Install system dependencies
run: |
sudo apt update -q
- sudo apt install -y build-essential pkg-config meson libssl-dev libglib2.0-dev-bin libgtk-3-dev libasound2-dev libpulse-dev
+ sudo apt install -y build-essential appstream-util pkg-config meson libssl-dev libglib2.0-dev-bin libgtk-3-dev libasound2-dev libpulse-dev
- name: Build
run: meson target -Dbuildtype=debug -Doffline=false && ninja -C target
diff --git a/data/dev.alextren.Spot.appdata.xml b/data/dev.alextren.Spot.appdata.xml
index 8bb12e7b..0ec90638 100644
--- a/data/dev.alextren.Spot.appdata.xml
+++ b/data/dev.alextren.Spot.appdata.xml
@@ -37,7 +37,7 @@
- improved playlist widget, added menu to jump from "Now playing" to related albums
- - added in-app notifications for some errors
+ - added in-app notifications for some errors
Fixes:
diff --git a/data/meson.build b/data/meson.build
index 8a8a7d57..88b15128 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -3,15 +3,15 @@ install_data('dev.alextren.Spot.desktop',
)
install_subdir('hicolor',
- install_dir: join_paths(get_option('datadir'), 'icons')
+ install_dir: get_option('datadir') / 'icons'
)
install_data('dev.alextren.Spot.appdata.xml',
- install_dir: join_paths(get_option('datadir'), 'appdata')
+ install_dir: get_option('datadir') / 'appdata'
)
install_data('dev.alextren.Spot.gschema.xml',
- install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
+ install_dir: get_option('datadir') / 'glib-2.0/schemas'
)
compile_schemas = find_program('glib-compile-schemas', required: false)
@@ -20,3 +20,12 @@ if compile_schemas.found()
args: ['--strict', '--dry-run', meson.current_source_dir()]
)
endif
+
+appstream_util = find_program('appstream-util', required: false)
+if appstream_util.found()
+ test(
+ 'Validate appstream appdata',
+ appstream_util,
+ args: ['validate-relax', meson.current_source_dir() / 'dev.alextren.Spot.appdata.xml']
+ )
+endif