We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe4d83f + d66f032 commit 56eb948Copy full SHA for 56eb948
Makefile
@@ -57,6 +57,16 @@ preview:
57
$(REMOTE_CMD) "cd $(RELEASES_DIR) && ln -snf $(TIMESTAMP) current"
58
@echo "\n\n**** Preview complete.\n\n"
59
@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 \"{}\"'"
70
71
72
ifeq ($(FORCE_DEPLOY), true)
0 commit comments