ci: prepare-artifacts-python: copy if src dir exist

prepare-artifacts-python.sh fails in drm-ci, since
src directory is not present in linux. So copy files
only if src directory is present.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31586>
This commit is contained in:
Vignesh Raman
2024-10-10 11:53:07 +05:30
committed by Marge Bot
parent fa9cd89a85
commit 8d5c67c937

View File

@@ -35,13 +35,15 @@ if [ ${#duplicate_files[@]} -gt 0 ]; then
exit 1
fi
find src/ -path '*/ci/*' \
\( \
-name '*.txt' \
-o -name '*.toml' \
-o -name '*traces*.yml' \
\) \
-exec cp -p {} artifacts/ \;
if [ -d "src/" ]; then
find src/ -path '*/ci/*' \
\( \
-name '*.txt' \
-o -name '*.toml' \
-o -name '*traces*.yml' \
\) \
-exec cp -p {} artifacts/ \;
fi
cp -Rp .gitlab-ci/*.txt artifacts/
if [ -n "$S3_ARTIFACT_NAME" ]; then