From e6a814fac8570c86bc283750f39a93cb079d9609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 22 Mar 2020 18:00:00 +0100 Subject: [PATCH] extensionPrefs: Ensure up-to-date release version in metainfo It's easy to forget to add a new 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 --- js/extensionPrefs/data/metainfo/meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/extensionPrefs/data/metainfo/meson.build b/js/extensionPrefs/data/metainfo/meson.build index 932651fbc..a144a56d0 100644 --- a/js/extensionPrefs/data/metainfo/meson.build +++ b/js/extensionPrefs/data/metainfo/meson.build @@ -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