ci_template: Don't use command substitution with find

GNU find has operations like -exec and -delete that operate without the
brittleness of applying shell word splitting to its output.

In addition, it won't fail if no files were matched.
This commit is contained in:
Jan Alexander Steffens (heftig) 2018-12-05 22:08:49 +01:00
parent 61074f6d8d
commit 5b664cd00f
No known key found for this signature in database
GPG key ID: A5E9288C4FA415FA

View file

@ -44,7 +44,7 @@ gst indent:
- indent --version || true
- curl -o gst-indent https://gitlab.freedesktop.org/gstreamer/gstreamer/raw/master/tools/gst-indent
- chmod +x gst-indent
- ./gst-indent $(find . -name "*.c")
- find . -name '*.c' -exec ./gst-indent {} +
- |
if [[ $(git diff) ]]; then
git diff --color=always
@ -80,7 +80,7 @@ gst indent:
after_script:
- cd gst-build/
# Clean the artifacts packages to avoid copying "useless" build products.
- rm $(find build -name "*.o") $(find -name "*.a")
- test -d build && find build -name '*.[ao]' -delete
# Clean the .git repos since we won't need them anymore
- rm -rf subprojects/*/.git/
- rm -rf build/subprojects/*/.git/