Fix framework update to propagate file deletions to end users

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-22 00:56:13 +00:00
parent 37a6183eb4
commit 0ac0bcf1af

View File

@@ -423,6 +423,18 @@ if [ "$ALREADY_UP_TO_DATE" = false ]; then
exit 1 exit 1
fi fi
echo " ✓ Framework updated (./rsx preserved by .gitattributes)" echo " ✓ Framework updated (./rsx preserved by .gitattributes)"
# Remove files that were deleted upstream (git merge doesn't auto-delete)
echo " → Cleaning up deleted files..."
DELETED_FILES=$(git diff --name-only --diff-filter=D HEAD~1 HEAD -- rsx/ 2>/dev/null || true)
if [ -n "$DELETED_FILES" ]; then
echo "$DELETED_FILES" | while read -r file; do
if [ -f "$file" ]; then
rm -f "$file"
echo " Removed: $file"
fi
done
fi
else else
# Framework mode: fast-forward only (updates everything including ./rsx) # Framework mode: fast-forward only (updates everything including ./rsx)
MERGE_OUTPUT=$(git merge --ff-only "$UPSTREAM_BRANCH" 2>&1) || { MERGE_OUTPUT=$(git merge --ff-only "$UPSTREAM_BRANCH" 2>&1) || {