From dc002a61eb305ffe54f8f0ff9fc9d6e36216eb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 8 Mar 2020 01:57:34 +0100 Subject: [PATCH] build: Assert extension-tool version is bumped alongside gnome-shell I always forget to keep the extension-tool version number in sync when doing a new release. Given that it's unlikely that I'll do much better in the future by myself, make distcheck fail when the versions don't match. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1076 --- meson.build | 7 ++++++- subprojects/extensions-tool/meson.build | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 43071fa23..680b189e0 100644 --- a/meson.build +++ b/meson.build @@ -244,12 +244,17 @@ libgvc = subproject('gvc', libgvc_gir = libgvc.get_variable('libgvc_gir') if get_option('extensions_tool') - subproject('extensions-tool', + extension_tool = subproject('extensions-tool', default_options: [ 'man=@0@'.format(get_option('man')), 'package_name=@0@'.format(meson.project_name()), ] ) + + extension_tool_version = extension_tool.get_variable('package_version') + assert(extension_tool_version == meson.project_version(), + 'extension-tool version does not match project version' + ) endif diff --git a/subprojects/extensions-tool/meson.build b/subprojects/extensions-tool/meson.build index bca8a8a36..0cee11234 100644 --- a/subprojects/extensions-tool/meson.build +++ b/subprojects/extensions-tool/meson.build @@ -10,6 +10,7 @@ gnome = import('gnome') i18n = import('i18n') package_name = get_option('package_name') +package_version = meson.project_version() prefix = get_option('prefix') bindir = join_paths(prefix, get_option('bindir'))