gnome-shell/js/extensionPrefs/data/metainfo/meson.build
Florian Müllner e6a814fac8 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
2020-03-25 19:56:52 +00:00

26 lines
672 B
Meson

metainfo = app_id + '.metainfo.xml'
i18n.merge_file(metainfo,
input: metainfo + '.in',
output: metainfo,
po_dir: '../../../../po',
install: true,
install_dir: metainfodir
)
if (appstream_util.found())
test('Validating ' + metainfo,
appstream_util,
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