Skip to content

Commit 0145793

Browse files
committed
testing
1 parent bc70e74 commit 0145793

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,17 @@ preview:
5858
@echo "\n\n**** Preview complete.\n\n"
5959
@echo "Open the preview site at: $(PREVIEW_SITE_URL)\n\n"
6060
@echo "\n**** Cleaning up old releases (keep latest 3, skip 'current')...\n"
61-
$(REMOTE_CMD) 'bash -c "cd $(RELEASES_DIR) && \
62-
for dir in $(ls -1dt */ | sed \"s:/*$$::\" | grep -v ^current$$ | grep -v ^$(TIMESTAMP)$$ | tail -n +2); do \
63-
echo rm -rf \"$$dir\"; \
64-
done"' | tee /dev/stdout
65-
@echo "Need more"
61+
$(REMOTE_CMD) "bash -c '\
62+
cd $(RELEASES_DIR) && \
63+
echo \"[INFO] In directory: \$$PWD\" && \
64+
echo \"[INFO] Listing contents:\" && ls -1dt */ && \
65+
echo \"[INFO] Cleaning (dry-run):\" && \
66+
ls -1dt */ \
67+
| sed \"s:/*\\\$$::\" \
68+
| grep -v ^current\\\$$ \
69+
| grep -v ^$(TIMESTAMP)\\\$$ \
70+
| tail -n +4 \
71+
| xargs -r -I{} echo rm -rf \"{}\"'"
6672

6773

6874
ifeq ($(FORCE_DEPLOY), true)

0 commit comments

Comments
 (0)