From cf912f6d15f62fc93e8c0d1ad5e64ba5c8870ccd Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 5 Oct 2021 08:51:08 -0400 Subject: [PATCH] ci: Fix gst-indent path It used to be downloaded into PATH, but we can now instead run it from git. Also move it to top source dir instead of gstreamer subproject. Part-of: --- gst-env.py | 2 +- {subprojects/gstreamer/tools => scripts}/gst-indent | 0 scripts/gst-indent-all | 5 ++++- subprojects/gst-docs/markdown/contribute/index.md | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) rename {subprojects/gstreamer/tools => scripts}/gst-indent (100%) diff --git a/gst-env.py b/gst-env.py index 6383910a94..5223a13022 100755 --- a/gst-env.py +++ b/gst-env.py @@ -302,7 +302,7 @@ def get_subprocess_env(options, gst_version): options.sysroot) # gst-indent - prepend_env_var(env, "PATH", os.path.join(SCRIPTDIR, 'gstreamer', 'tools'), + prepend_env_var(env, "PATH", os.path.join(SCRIPTDIR, 'scripts'), options.sysroot) # tools: gst-launch-1.0, gst-inspect-1.0 diff --git a/subprojects/gstreamer/tools/gst-indent b/scripts/gst-indent similarity index 100% rename from subprojects/gstreamer/tools/gst-indent rename to scripts/gst-indent diff --git a/scripts/gst-indent-all b/scripts/gst-indent-all index c0580b1aed..ee878d838b 100755 --- a/scripts/gst-indent-all +++ b/scripts/gst-indent-all @@ -1,5 +1,8 @@ #!/bin/bash +BASEDIR=$(dirname $0) + + filter_cmd=("cat") if test -f ".indentignore"; then filter_args=() @@ -12,4 +15,4 @@ if test -f ".indentignore"; then filter_cmd=("grep" "-v" "${filter_args[@]}") fi fi -git ls-files "*.c" | "${filter_cmd[@]}" | xargs -d '\n' gst-indent +git ls-files "*.c" | "${filter_cmd[@]}" | xargs -d '\n' $BASEDIR/gst-indent diff --git a/subprojects/gst-docs/markdown/contribute/index.md b/subprojects/gst-docs/markdown/contribute/index.md index 987f9ebbd5..1d2386ad2a 100644 --- a/subprojects/gst-docs/markdown/contribute/index.md +++ b/subprojects/gst-docs/markdown/contribute/index.md @@ -324,7 +324,7 @@ changes selectively via `git add -p`. You can bypass the local indentation check hook by using `git commit -n`, but it will still be checked again later when you submit your changes through GitLab for merging. -[gst-indent]: https://gitlab.freedesktop.org/gstreamer/gstreamer/tree/master/tools/gst-indent +[gst-indent]: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/scripts/gst-indent-all [create-mr]: https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html ### Writing Good Commit Messages