Commit 88e512ca authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

update-readmes: extract version from meson.build

parent f32031c0
......@@ -22,6 +22,8 @@ You can subscribe to our mailing lists:
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Follow us on Twitter: https://twitter.com/GStreamer
We track bugs, feature requests and merge requests (patches) in GitLab at
https://gitlab.freedesktop.org/gstreamer/
......
#!/bin/sh
#
# Check that the code follows a consistant code style
# Check that the code follows a consistent code style
#
# Check for existence of indent, and error out if not present.
......
......@@ -7,13 +7,13 @@
README_FILES="README README.static-linking MAINTAINERS"
if [ ! -f "common/update-readmes" -o ! -f configure.ac ]; then
if [ ! -f "common/update-readmes" -o ! -f meson_options.txt ]; then
echo "Run ./common/update-readmes from the top-level source directory of a GStreamer module";
exit 1;
fi
MAJOR_VERSION=`grep '^AC_INIT' configure.ac | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\1/'`
MINOR_VERSION=`grep '^AC_INIT' configure.ac | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\2/'`
MAJOR_VERSION=`head -n 5 meson.build | grep -e '^\s*version\s*:' | sed -e "s%^\s*version\s*:\s*'%%" -e "s%',%%" | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\1/'`
MINOR_VERSION=`head -n 5 meson.build | grep -e '^\s*version\s*:' | sed -e "s%^\s*version\s*:\s*'%%" -e "s%',%%" | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\2/'`
if test x$MAJOR_VERSION = x -o x$MINOR_VERSION = x ; then
echo "Failed to extract major/minor version";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment