summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-07-08 17:07:35 +0100
committerTim-Philipp Müller <tim@centricular.com>2020-07-08 17:07:35 +0100
commit9c1aacb6351c3823b6c4b438abd0aead20a65aa2 (patch)
tree77021ad5975dcde4f731f846d034105470064193 /meson.build
parent59a7742cff8c8309176523edf6445e5a07e9fef0 (diff)
meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/61>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 14 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 9b364ed8..174b1e7a 100644
--- a/meson.build
+++ b/meson.build
@@ -269,6 +269,20 @@ if find_program('xgettext', required : get_option('nls')).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-plugins-ugly.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)
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')