diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2019-09-29 01:18:13 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-09-29 01:19:31 +0100 |
commit | 88e512ca7197a45c4114f7fa993108f23245bf50 (patch) | |
tree | b7863d6bac33536c9dce4df4ccdbeb2b6870066e | |
parent | f32031c0c1eefb227ab5ce77722a23bf1fe59891 (diff) |
update-readmes: extract version from meson.build
-rw-r--r-- | README | 2 | ||||
-rwxr-xr-x | hooks/pre-commit.hook | 2 | ||||
-rwxr-xr-x | update-readmes | 6 |
3 files changed, 6 insertions, 4 deletions
@@ -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/ diff --git a/hooks/pre-commit.hook b/hooks/pre-commit.hook index 3c1062b..6f17740 100755 --- a/hooks/pre-commit.hook +++ b/hooks/pre-commit.hook @@ -1,6 +1,6 @@ #!/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. diff --git a/update-readmes b/update-readmes index 1eb9912..b216396 100755 --- a/update-readmes +++ b/update-readmes @@ -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"; |