mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
e6ad3ad0cd
commit
a18d347bf5
|
@ -49,7 +49,7 @@ if appstreamcli.found()
|
||||||
find_program('test-appdata.sh', required: true, dirs: [meson.current_source_dir()]),
|
find_program('test-appdata.sh', required: true, dirs: [meson.current_source_dir()]),
|
||||||
env: [
|
env: [
|
||||||
'GIMP_TESTING_BUILDDIR=' + meson.current_build_dir(),
|
'GIMP_TESTING_BUILDDIR=' + meson.current_build_dir(),
|
||||||
'GIMP_RELEASE=' + (release ? '1' : '0'),
|
'GIMP_RELEASE=' + (release and not gimp_rc_git ? '1' : '0'),
|
||||||
],
|
],
|
||||||
suite: 'desktop',
|
suite: 'desktop',
|
||||||
)
|
)
|
||||||
|
|
|
@ -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_version_minor = gimp_app_version_arr[1].to_int()
|
||||||
gimp_app_micro_rc = gimp_app_version_arr[2].split('-')
|
gimp_app_micro_rc = gimp_app_version_arr[2].split('-')
|
||||||
gimp_app_version_micro = gimp_app_micro_rc[0].to_int()
|
gimp_app_version_micro = gimp_app_micro_rc[0].to_int()
|
||||||
|
gimp_rc_git = false
|
||||||
if gimp_app_micro_rc.length() > 1
|
if gimp_app_micro_rc.length() > 1
|
||||||
if not gimp_app_micro_rc[1].startswith('RC')
|
if not gimp_app_micro_rc[1].startswith('RC')
|
||||||
error('Version format is: <major>.<minor>.<micro> with optional "-RC<num>" suffix and optional "+git".')
|
error('Version format is: <major>.<minor>.<micro> with optional "-RC<num>" suffix and optional "+git".')
|
||||||
endif
|
endif
|
||||||
if gimp_app_micro_rc[1].endswith('+git')
|
if gimp_app_micro_rc[1].endswith('+git')
|
||||||
gimp_app_version_rc = gimp_app_micro_rc[1].substring(2, -4).to_int()
|
gimp_app_version_rc = gimp_app_micro_rc[1].substring(2, -4).to_int()
|
||||||
|
gimp_rc_git = true
|
||||||
else
|
else
|
||||||
gimp_app_version_rc = gimp_app_micro_rc[1].substring(2).to_int()
|
gimp_app_version_rc = gimp_app_micro_rc[1].substring(2).to_int()
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue