summaryrefslogtreecommitdiff
path: root/scripts/meson.build
blob: 0554b17b6efd5023e56923e541e9a5e8a3fe425b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
fs = import('fs')

# scripts checks
release_modules = [
  'gstreamer',
  'gst-plugins-base',
  'gst-plugins-good',
  'gst-plugins-ugly',
  'gst-plugins-bad',
  'gst-libav',
  'gst-rtsp-server',
  'gst-editing-services',
  'gst-devtools',
  'gst-python',
  'gstreamer-vaapi',
  'gst-omx',
  'gst-docs',
  'gstreamer-sharp',
]

# Make sure the files are all identical to avoid divergence
gen_cl_hash = fs.hash(files('gen-changelog.py'), 'md5')

out_of_sync_list = []

foreach m : release_modules
  module_gen_cl_hash = fs.hash(f'../subprojects/@m@/scripts/gen-changelog.py', 'md5')

  if module_gen_cl_hash != gen_cl_hash
    out_of_sync_list += [f'subprojects/@m@/scripts/gen-changelog.py']
  endif
endforeach

if out_of_sync_list.length() > 0
  module_list = ' '.join(release_modules)
  out_of_sync_msg = '\n          '.join(out_of_sync_list)
  error('''

    ==============================================================================================================

        The following subproject scripts are out of sync with scripts/gen-changelog.py:

          @0@

        Run

          for m in @1@; do cp scripts/gen-changelog.py subprojects/$m/scripts/gen-changelog.py; done 

        from the top-level git source directory to sync them up.

    ==============================================================================================================
    '''.format(out_of_sync_msg, module_list))
endif