Use trap-based Tcl metadata tmpdir cleanup in appimage workflows

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
This commit is contained in:
Darryl L. Miles
2026-07-23 16:09:35 -04:00
committed by R. Timothy Edwards
co-authored by copilot-swe-agent[bot] <198982749+[email protected]>
parent a365d5a5c1
commit a5aa32883c
5 changed files with 17 additions and 9 deletions
+4 -2
View File
@@ -154,14 +154,16 @@ jobs:
if [ "$source_method" = "github" ]; then
tcl_tmpdir=$(mktemp -d)
cleanup_tcl_tmpdir() { rm -rf "$tcl_tmpdir"; }
trap cleanup_tcl_tmpdir EXIT
if ! git -c advice.detachedHead=false clone --depth 1 --single-branch --branch "$tcl_ref" https://github.com/tcltk/tcl.git "$tcl_tmpdir"; then
rm -rf "$tcl_tmpdir"
echo "Failed to clone Tcl ref $tcl_ref" >&2
exit 1
fi
tcl_commit=$(git -C "$tcl_tmpdir" rev-parse HEAD)
tcl_commit_date=$(git -C "$tcl_tmpdir" log -1 --format=%ci)
rm -rf "$tcl_tmpdir"
trap - EXIT
cleanup_tcl_tmpdir
else
tcl_commit=""
tcl_commit_date=""
+4 -2
View File
@@ -154,14 +154,16 @@ jobs:
if [ "$source_method" = "github" ]; then
tcl_tmpdir=$(mktemp -d)
cleanup_tcl_tmpdir() { rm -rf "$tcl_tmpdir"; }
trap cleanup_tcl_tmpdir EXIT
if ! git -c advice.detachedHead=false clone --depth 1 --single-branch --branch "$tcl_ref" https://github.com/tcltk/tcl.git "$tcl_tmpdir"; then
rm -rf "$tcl_tmpdir"
echo "Failed to clone Tcl ref $tcl_ref" >&2
exit 1
fi
tcl_commit=$(git -C "$tcl_tmpdir" rev-parse HEAD)
tcl_commit_date=$(git -C "$tcl_tmpdir" log -1 --format=%ci)
rm -rf "$tcl_tmpdir"
trap - EXIT
cleanup_tcl_tmpdir
else
tcl_commit=""
tcl_commit_date=""
+4 -2
View File
@@ -154,14 +154,16 @@ jobs:
if [ "$source_method" = "github" ]; then
tcl_tmpdir=$(mktemp -d)
cleanup_tcl_tmpdir() { rm -rf "$tcl_tmpdir"; }
trap cleanup_tcl_tmpdir EXIT
if ! git -c advice.detachedHead=false clone --depth 1 --single-branch --branch "$tcl_ref" https://github.com/tcltk/tcl.git "$tcl_tmpdir"; then
rm -rf "$tcl_tmpdir"
echo "Failed to clone Tcl ref $tcl_ref" >&2
exit 1
fi
tcl_commit=$(git -C "$tcl_tmpdir" rev-parse HEAD)
tcl_commit_date=$(git -C "$tcl_tmpdir" log -1 --format=%ci)
rm -rf "$tcl_tmpdir"
trap - EXIT
cleanup_tcl_tmpdir
else
tcl_commit=""
tcl_commit_date=""
+4 -2
View File
@@ -154,14 +154,16 @@ jobs:
if [ "$source_method" = "github" ]; then
tcl_tmpdir=$(mktemp -d)
cleanup_tcl_tmpdir() { rm -rf "$tcl_tmpdir"; }
trap cleanup_tcl_tmpdir EXIT
if ! git -c advice.detachedHead=false clone --depth 1 --single-branch --branch "$tcl_ref" https://github.com/tcltk/tcl.git "$tcl_tmpdir"; then
rm -rf "$tcl_tmpdir"
echo "Failed to clone Tcl ref $tcl_ref" >&2
exit 1
fi
tcl_commit=$(git -C "$tcl_tmpdir" rev-parse HEAD)
tcl_commit_date=$(git -C "$tcl_tmpdir" log -1 --format=%ci)
rm -rf "$tcl_tmpdir"
trap - EXIT
cleanup_tcl_tmpdir
else
tcl_commit=""
tcl_commit_date=""