From a18d347bf5d8116ebd845f502090420e8092a18c Mon Sep 17 00:00:00 2001 From: Jehan Date: Fri, 6 Dec 2024 17:43:58 +0900 Subject: [PATCH] desktop: fix AppData unit testing when in RC+git code. We still want the normal GIMP_RELEASE C macro to be set because the whole development frame should have code behaving like release code, yet only for the AppStream metadata testing, we want to allow a "TODO" release date while in +git code. --- desktop/meson.build | 2 +- meson.build | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop/meson.build b/desktop/meson.build index a493d35f2f..5351b08e14 100644 --- a/desktop/meson.build +++ b/desktop/meson.build @@ -49,7 +49,7 @@ if appstreamcli.found() find_program('test-appdata.sh', required: true, dirs: [meson.current_source_dir()]), env: [ 'GIMP_TESTING_BUILDDIR=' + meson.current_build_dir(), - 'GIMP_RELEASE=' + (release ? '1' : '0'), + 'GIMP_RELEASE=' + (release and not gimp_rc_git ? '1' : '0'), ], suite: 'desktop', ) diff --git a/meson.build b/meson.build index d6a3b25c43..5dcfd506ab 100644 --- a/meson.build +++ b/meson.build @@ -31,12 +31,14 @@ gimp_app_version_major = gimp_app_version_arr[0].to_int() gimp_app_version_minor = gimp_app_version_arr[1].to_int() gimp_app_micro_rc = gimp_app_version_arr[2].split('-') gimp_app_version_micro = gimp_app_micro_rc[0].to_int() +gimp_rc_git = false if gimp_app_micro_rc.length() > 1 if not gimp_app_micro_rc[1].startswith('RC') error('Version format is: .. with optional "-RC" suffix and optional "+git".') endif if gimp_app_micro_rc[1].endswith('+git') gimp_app_version_rc = gimp_app_micro_rc[1].substring(2, -4).to_int() + gimp_rc_git = true else gimp_app_version_rc = gimp_app_micro_rc[1].substring(2).to_int() endif