meson: check gitlint version

We use 'regex-style-search' which requires at least 0.18.

F38 still ships with 0.15 it seems.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5049#note_2004507

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5056>
This commit is contained in:
Tim-Philipp Müller 2023-07-18 13:34:14 +02:00 committed by GStreamer Marge Bot
parent 3257ee4374
commit 4abe4b2d2a

View file

@ -33,12 +33,12 @@ endif
# Install gst-indent pre-commit hook # Install gst-indent pre-commit hook
run_command(python3, '-c', 'import shutil; shutil.copy("scripts/git-hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")', check: false) run_command(python3, '-c', 'import shutil; shutil.copy("scripts/git-hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")', check: false)
gitlint_req = '>= 0.18'
gitlint = find_program('gitlint', required: false) gitlint = find_program('gitlint', version: gitlint_req, required: false)
if gitlint.found() if gitlint.found()
run_command(gitlint, 'install-hook', check: false) run_command(gitlint, 'install-hook', check: false)
else else
message('gitlint not found, please install it with your package manager or `python3 -m pip install gitlint` to enable the commit message hook') message('gitlint not found or too old, please install it with your package manager or `python3 -m pip install gitlint` to enable the commit message hook')
endif endif
# On macOS, you have to run "Install Certificates.command" otherwise Python # On macOS, you have to run "Install Certificates.command" otherwise Python