Skip to content

Commit

Permalink
add appdata validation to tests + fix appdata
Browse files Browse the repository at this point in the history
  • Loading branch information
xou816 committed Jan 24, 2021
1 parent 18f07d8 commit f09fac7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spot-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data/dev.alextren.Spot.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</p>
<ul>
<li>improved playlist widget, added menu to jump from "Now playing" to related albums</li>
<li>added in-app notifications for <i>some</i> errors</li>
<li>added in-app notifications for some errors</li>
</ul>
<p>Fixes:</p>
<ul>
Expand Down
15 changes: 12 additions & 3 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

0 comments on commit f09fac7

Please sign in to comment.