'Generic Commit'
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 45s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m0s

This commit is contained in:
Your Name
2025-06-22 12:03:18 +12:00
parent c4001b0efc
commit 1fb8333e5f
2 changed files with 7 additions and 16 deletions

View File

@ -62,15 +62,13 @@ cleanup() {
if [ -n "${SOS_WRITE_TOKEN:-}" ]; then
echo "Attempting to clean up test objects from getpkg.xyz..."
# Get the hash of our test tool if it exists
HASH=$(curl -s "https://getpkg.xyz/hash/${TEST_TOOL_NAME}:${TEST_ARCH}" 2>/dev/null || echo "")
if [ -n "$HASH" ] && [ "$HASH" != "null" ] && [ "$HASH" != "Not found" ]; then
echo "Found test tool hash: $HASH"
# Delete the object
curl -s -H "Authorization: Bearer ${SOS_WRITE_TOKEN}" \
"https://getpkg.xyz/deleteobject?hash=${HASH}" >/dev/null 2>&1 || true
echo "Cleaned up test tool from getpkg.xyz"
fi
# Clean up main architecture variant
$GETPKG unpublish "${TEST_TOOL_NAME}:${TEST_ARCH}" 2>/dev/null || true
# Clean up noarch variant
$GETPKG unpublish "${TEST_TOOL_NAME}-noarch:universal" 2>/dev/null || true
echo "Cleaned up test tools from getpkg.xyz"
else
echo "Note: SOS_WRITE_TOKEN not set, cannot clean up remote test objects"
fi