From 537f754fb037ce315bb3813b2a9d79f4846e2f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 31 Aug 2021 12:25:28 +0200 Subject: [PATCH] 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: --- .../extensions-app/build-aux/meson/check-version.py | 1 + subprojects/extensions-app/data/metainfo/meson.build | 9 --------- subprojects/extensions-app/meson.build | 7 +++++++ 3 files changed, 8 insertions(+), 9 deletions(-) create mode 120000 subprojects/extensions-app/build-aux/meson/check-version.py diff --git a/subprojects/extensions-app/build-aux/meson/check-version.py b/subprojects/extensions-app/build-aux/meson/check-version.py new file mode 120000 index 000000000..fbe6c7458 --- /dev/null +++ b/subprojects/extensions-app/build-aux/meson/check-version.py @@ -0,0 +1 @@ +../../../../meson/check-version.py \ No newline at end of file diff --git a/subprojects/extensions-app/data/metainfo/meson.build b/subprojects/extensions-app/data/metainfo/meson.build index 4406a3e5b..c4962c057 100644 --- a/subprojects/extensions-app/data/metainfo/meson.build +++ b/subprojects/extensions-app/data/metainfo/meson.build @@ -13,13 +13,4 @@ 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 diff --git a/subprojects/extensions-app/meson.build b/subprojects/extensions-app/meson.build index 24abe118d..da539ed04 100644 --- a/subprojects/extensions-app/meson.build +++ b/subprojects/extensions-app/meson.build @@ -62,6 +62,13 @@ if not meson.is_subproject() 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 = { 'prefix': get_option('prefix'), 'bindir': get_option('bindir'),