summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-07-08 17:02:34 +0100
committerTim-Philipp Müller <tim@centricular.com>2020-07-08 17:02:34 +0100
commite394e6a034446a9488e1b4a1392ae67cf0bb4240 (patch)
tree2e403f62411534c4088ca0a7075462e3623db0f2 /meson.build
parent54bc0157b5ef21aa534825ada927289de58a370e (diff)
downloadgstreamer-plugins-good-e394e6a034446a9488e1b4a1392ae67cf0bb4240.tar.gz
meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/664>
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 c003c2bb8..3a4ac3166 100644
--- a/meson.build
+++ b/meson.build
@@ -444,6 +444,20 @@ if find_program('xgettext', required : get_option('nls')).found()
subdir('po')
endif
+# 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-good.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")')