build: Move metainfo version check into distscript

The time we really care about current release information in appdata is
when preparing a release, not during regular builds.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1968>
This commit is contained in:
Florian Müllner 2021-08-31 12:25:28 +02:00
parent 418d86a16f
commit 537f754fb0
3 changed files with 8 additions and 9 deletions

View File

@ -0,0 +1 @@
../../../../meson/check-version.py

View File

@ -13,13 +13,4 @@ if (appstream_util.found())
args: ['validate', '--nonet', metainfo], args: ['validate', '--nonet', metainfo],
workdir: meson.current_build_dir() 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 endif

View File

@ -62,6 +62,13 @@ if not meson.is_subproject()
meson.add_install_script('build-aux/meson/postinstall.py') meson.add_install_script('build-aux/meson/postinstall.py')
if appstream_util.found()
meson.add_dist_script('build-aux/meson/check-version.py',
meson.project_version(),
'--type=metainfo',
'data/metainfo/org.gnome.Extensions.metainfo.xml.in')
endif
summary_dirs = { summary_dirs = {
'prefix': get_option('prefix'), 'prefix': get_option('prefix'),
'bindir': get_option('bindir'), 'bindir': get_option('bindir'),