Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/release/require-release-tag-checkout.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
tmp_dir="$(mktemp -d)"
trap 'rm -rf "${tmp_dir}"' EXIT
# CI saw `rm: cannot remove '.../checkout': Directory not empty` here: a
# detached `git maintenance run --auto` (spawned by the fixture's commit and
# pushes) was still writing into .git while the trap deleted it. Keep every
# git process in this fixture from spawning one, and retry once regardless.
export GIT_CONFIG_COUNT=2
export GIT_CONFIG_KEY_0=maintenance.auto GIT_CONFIG_VALUE_0=false
export GIT_CONFIG_KEY_1=gc.auto GIT_CONFIG_VALUE_1=0
trap 'rm -rf "${tmp_dir}" 2>/dev/null || { sleep 1; rm -rf "${tmp_dir}"; }' EXIT

remote="${tmp_dir}/remote.git"
checkout="${tmp_dir}/checkout"
Expand Down
Loading