summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-23 18:32:07 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-23 18:32:07 +0100
commit19fbad7918f6bd313bdcffc7c71e0729f3a0e0c2 (patch)
treead5659f812ff7b7e4567321b388154ca50b91e50 /ci
parentMerge branch 'ps/reftable-alloc-failures-zalloc-fix' (diff)
parentci/lib: fix "CI setup" sections with GitLab CI (diff)
downloadgit-19fbad7918f6bd313bdcffc7c71e0729f3a0e0c2.tar.xz
git-19fbad7918f6bd313bdcffc7c71e0729f3a0e0c2.zip
Merge branch 'ps/ci-gitlab-update'
GitLab CI updates. * ps/ci-gitlab-update: ci/lib: fix "CI setup" sections with GitLab CI ci/lib: do not interpret escape sequences in `group ()` arguments ci/lib: remove duplicate trap to end "CI setup" group gitlab-ci: update macOS images to Sonoma
Diffstat (limited to 'ci')
-rwxr-xr-xci/lib.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/ci/lib.sh b/ci/lib.sh
index 930f98d722..5440eb6dc0 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -18,7 +18,8 @@ elif test true = "$GITLAB_CI"
then
begin_group () {
need_to_end_group=t
- printf "\e[0Ksection_start:$(date +%s):$(echo "$1" | tr ' ' _)[collapsed=true]\r\e[0K$1\n"
+ printf '\e[0Ksection_start:%s:%s[collapsed=true]\r\e[0K%s\n' \
+ "$(date +%s)" "$(echo "$1" | tr ' ' _)" "$1"
trap "end_group '$1'" EXIT
set -x
}
@@ -27,7 +28,8 @@ then
test -n "$need_to_end_group" || return 0
set +x
need_to_end_group=
- printf "\e[0Ksection_end:$(date +%s):$(echo "$1" | tr ' ' _)\r\e[0K\n"
+ printf '\e[0Ksection_end:%s:%s\r\e[0K\n' \
+ "$(date +%s)" "$(echo "$1" | tr ' ' _)"
trap - EXIT
}
else
@@ -55,8 +57,7 @@ group () {
return $res
}
-begin_group "CI setup"
-trap "end_group 'CI setup'" EXIT
+begin_group "CI setup via $(basename $0)"
# Set 'exit on error' for all CI scripts to let the caller know that
# something went wrong.
@@ -394,5 +395,5 @@ esac
MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
-end_group "CI setup"
+end_group "CI setup via $(basename $0)"
set -x