Skip to content

Commit 56eb948

Browse files
authored
Merge branch 'ep2025' into ep2025-sponsor-logo-prusa
2 parents fe4d83f + d66f032 commit 56eb948

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ preview:
5757
$(REMOTE_CMD) "cd $(RELEASES_DIR) && ln -snf $(TIMESTAMP) current"
5858
@echo "\n\n**** Preview complete.\n\n"
5959
@echo "Open the preview site at: $(PREVIEW_SITE_URL)\n\n"
60+
@echo "\n**** Cleaning up old releases (keep latest 1, skip 'current')...\n"
61+
$(REMOTE_CMD) "bash -c '\
62+
cd $(RELEASES_DIR) && \
63+
echo \"[INFO] Cleaning:\" && \
64+
ls -1dt */ \
65+
| sed \"s:/*\\\$$::\" \
66+
| grep -v ^current\\\$$ \
67+
| grep -v ^$(TIMESTAMP)\\\$$ \
68+
| tail -n +2 \
69+
| xargs -r -I{} echo rm -rf \"{}\"'"
6070

6171

6272
ifeq ($(FORCE_DEPLOY), true)

0 commit comments

Comments
 (0)