From 47558b718aaf8dfd8f444a8109e8c446c13f3e79 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Mon, 11 Nov 2024 18:21:29 +0100 Subject: [PATCH] ci: set GIT_COMMITTER_DATE in a locale-agnostic format When adding patches wit git-am create the date format for GIT_COMMITTER_DATE in a locale-agnostic format, this avoids potential issues when running the scripts locally with a non-English locale, e.g.: ----------------------------------------------------------------------- ++ GIT_COMMITTER_DATE='gio 1 gen 1970, 01:00:00, CET' ++ git am fatal: invalid date format: gio 1 gen 1970, 01:00:00, CET ----------------------------------------------------------------------- Reviewed-by: Eric Engestrom Part-of: --- .gitlab-ci/container/build-angle.sh | 2 +- .gitlab-ci/container/build-deqp.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 .gitlab-ci/container/build-deqp.sh diff --git a/.gitlab-ci/container/build-angle.sh b/.gitlab-ci/container/build-angle.sh index deaeffeff13..b47637c6c9d 100644 --- a/.gitlab-ci/container/build-angle.sh +++ b/.gitlab-ci/container/build-angle.sh @@ -30,7 +30,7 @@ angle_patch_files=( ) for patch in "${angle_patch_files[@]}"; do echo "Apply patch to ANGLE from ${patch}" - GIT_COMMITTER_DATE=$(date -d@0) git am < "${ANGLE_PATCH_DIR}/${patch}" + GIT_COMMITTER_DATE="$(LC_TIME=C date -d@0)" git am < "${ANGLE_PATCH_DIR}/${patch}" done { diff --git a/.gitlab-ci/container/build-deqp.sh b/.gitlab-ci/container/build-deqp.sh old mode 100644 new mode 100755 index eb4bab7ee69..838c747a751 --- a/.gitlab-ci/container/build-deqp.sh +++ b/.gitlab-ci/container/build-deqp.sh @@ -133,14 +133,14 @@ do PATCH_URL="https://github.com/KhronosGroup/VK-GL-CTS/commit/$commit.patch" echo "Apply patch to ${DEQP_API} CTS from $PATCH_URL" curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | \ - GIT_COMMITTER_DATE=$(date -d@0) git am - + GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am - done cts_patch_files="${prefix}_cts_patch_files[@]" for patch in "${!cts_patch_files}" do echo "Apply patch to ${DEQP_API} CTS from $patch" - GIT_COMMITTER_DATE=$(date -d@0) git am < $OLDPWD/.gitlab-ci/container/patches/$patch + GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am < $OLDPWD/.gitlab-ci/container/patches/$patch done {