diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2020-07-08 17:39:20 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-07-08 17:45:27 +0100 |
commit | e270b412277f460d8db48ba65fb3df6281e282c7 (patch) | |
tree | b31a2b25a75ad1d316957459dc93c433f8a542d4 /meson.build | |
parent | 8647f4d4807c12ea6c076b7a9e5985f7427453fc (diff) |
meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-omx/-/merge_requests/69>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/meson.build b/meson.build index f06dce2b0e..b26b16fe41 100644 --- a/meson.build +++ b/meson.build @@ -388,8 +388,6 @@ else message('GStreamer debug system is enabled') endif -configure_file(output : 'config.h', configuration : cdata) - subdir('config') if not get_option('examples').disabled() @@ -407,5 +405,21 @@ if not get_option('tests').disabled() and gstcheck_dep.found() endif subdir('docs') +# Set release date +if gst_version_nano == 0 + extract_release_date = find_program('scripts/extract-release-date-from-doap-file.py') + run_result = run_command(extract_release_date, gst_version, files('gst-omx.doap')) + if run_result.returncode() == 0 + release_date = run_result.stdout().strip() + cdata.set_quoted('GST_PACKAGE_RELEASE_DATETIME', release_date) + message('Package release date: ' + release_date) + else + # Error out if our release can't be found in the .doap file + error(run_result.stderr()) + endif +endif + +configure_file(output: 'config.h', configuration: cdata) + python3 = find_program('python3') run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")') |