Release 1.22.4
[platform/upstream/gstreamer.git] / scripts / meson.build
1 fs = import('fs')
2
3 # scripts checks
4 release_modules = [
5   'gstreamer',
6   'gst-plugins-base',
7   'gst-plugins-good',
8   'gst-plugins-ugly',
9   'gst-plugins-bad',
10   'gst-libav',
11   'gst-rtsp-server',
12   'gst-editing-services',
13   'gst-devtools',
14   'gst-python',
15   'gstreamer-vaapi',
16   'gst-omx',
17   'gst-docs',
18   'gstreamer-sharp',
19 ]
20
21 # Make sure the files are all identical to avoid divergence
22 gen_cl_hash = fs.hash(files('gen-changelog.py'), 'md5')
23
24 out_of_sync_list = []
25
26 foreach m : release_modules
27   module_gen_cl_hash = fs.hash(f'../subprojects/@m@/scripts/gen-changelog.py', 'md5')
28
29   if module_gen_cl_hash != gen_cl_hash
30     out_of_sync_list += [f'subprojects/@m@/scripts/gen-changelog.py']
31   endif
32 endforeach
33
34 if out_of_sync_list.length() > 0
35   module_list = ' '.join(release_modules)
36   out_of_sync_msg = '\n          '.join(out_of_sync_list)
37   error('''
38
39     ==============================================================================================================
40
41         The following subproject scripts are out of sync with scripts/gen-changelog.py:
42
43           @0@
44
45         Run
46
47           for m in @1@; do cp scripts/gen-changelog.py subprojects/$m/scripts/gen-changelog.py; done 
48
49         from the top-level git source directory to sync them up.
50
51     ==============================================================================================================
52     '''.format(out_of_sync_msg, module_list))
53 endif