build-push-action/remove-tags.sh
Claude afff3d41cb fix: prevent buildkit corruption on sticky disk commit
- Add graceful shutdown validation - fail if buildkitd doesn't shutdown cleanly
- Add sync after buildkitd termination to flush database writes
- Add buildkit state validation before committing sticky disk
- Prevent sticky disk commit on build failures
- Add multiple sync operations before unmounting
- Add buildkit validation utilities to check database integrity

This should prevent the BoltDB corruption issues we've been seeing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 17:59:12 -04:00

52 lines
1.1 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
#
# delete-old-tags.sh
#
# USAGE
# chmod +x delete-old-tags.sh
# ./delete-old-tags.sh
#
# NOTES
# • Assumes your forks remote is called “origin”.
# • Safe to re-run; it silently ignores tags that are already gone.
# • Groups remote deletions in batches of ≤50 so the push command line
# never gets too long.
set -euo pipefail
TAGS=$(cat <<'EOF'
v6.15.0
v6.14.0
EOF
)
#######################################
# 1. Delete the tags locally
#######################################
for tag in $TAGS; do
git tag -d "$tag" 2>/dev/null || true
done
#######################################
# 2. Delete them on GitHub (origin)
# push in batches of 50
#######################################
batch=()
count=0
for tag in $TAGS; do
batch+=(":refs/tags/$tag")
((count++))
if (( count == 50 )); then
git push origin "${batch[@]}"
batch=()
count=0
fi
done
# push any remainder
if (( ${#batch[@]} )); then
git push origin "${batch[@]}"
fi
echo "✅ All listed tags have been removed locally and on origin."