'Generic Commit'
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user