extensionPrefs: Ensure up-to-date release version in metainfo

It's easy to forget to add a new <release> tag to the metainfo when
doing a new release.

Address this with an additional test if appstream-util is recent
enough to include the new validate-version command, so distcheck
fails when the metainfo wasn't updated.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1117
This commit is contained in:
Florian Müllner 2020-03-22 18:00:00 +01:00 committed by Florian Müllner
parent ddb85c03c3
commit e6a814fac8

View File

@ -13,4 +13,13 @@ if (appstream_util.found())
args: ['validate', '--nonet', metainfo],
workdir: meson.current_build_dir()
)
r = run_command(appstream_util, '--help')
if (r.stdout().contains('validate-version'))
test('Checking release entry for @0@'.format(meson.project_version()),
appstream_util,
args: ['validate-version', metainfo, meson.project_version()],
workdir: meson.current_build_dir()
)
endif
endif