- Drop "-dirty" suffix before processing version info - Don't fail on versions without 'minor' specified (e.g. v0.15) Signed-off-by: Roman Bogorodskiy <bogorodskiy@xxxxxxxxx> --- server/meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/meson.build b/server/meson.build index 4a670635..4fadb6e4 100644 --- a/server/meson.build +++ b/server/meson.build @@ -8,10 +8,15 @@ if meson.project_version().startswith('UNKNOWN') minor = '0' micro = '1' else - version_info = meson.project_version().split('.') + version_str = meson.project_version() + # drop "-dirty" suffix + if version_str.contains('-') + version_str = version_str.split('-')[0] + endif + version_info = version_str.split('.') major = '@0@'.format(version_info[0]) minor = '@0@'.format(version_info[1]) - micro = version_info[2].to_int() + micro = version_info.get(2, '0').to_int() if version_info.length() >= 4 micro += 1 endif -- 2.30.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel