Skip to content

Conversation

@nikoshell
Copy link
Contributor

@nikoshell nikoshell commented Jun 14, 2025

Fix #1300

cd $(RELEASES_DIR) && \
ls -1dt */ |                         # list dirs by modification time
grep -v "^current/?$$" |             # skip the 'current' symlink
grep -v "^$(TIMESTAMP)/$$" |         # skip the one we just deployed
tail -n +4 |                         # keep the latest 3
xargs -r echo rm -rf                 # delete the rest (dry-mode with echo)

with "echo" in the command it's dry-mode

example output
image

@europython-society
Copy link
Member

europython-society commented Jun 14, 2025

Preview available

Key Value
url https://ep2025-space.ep-preview.click
last update 2025-06-26T21:39:57.742Z

@nikoshell nikoshell requested a review from egeakman June 14, 2025 21:32
@nikoshell nikoshell self-assigned this Jun 16, 2025
@clytaemnestra clytaemnestra added the DO-NOT-MERGE Not ready to be merged yet label Jun 16, 2025
@clytaemnestra clytaemnestra requested a review from artcz June 16, 2025 18:12
@nikoshell nikoshell changed the title One directory per branch Clean old deployment directories Jun 21, 2025
@nikoshell nikoshell requested a review from clytaemnestra June 22, 2025 07:50
@nikoshell nikoshell removed the DO-NOT-MERGE Not ready to be merged yet label Jun 22, 2025
@nikoshell nikoshell merged commit d66f032 into ep2025 Jun 27, 2025
6 checks passed
@nikoshell nikoshell deleted the ep2025-space branch June 27, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cronjob to periodically remove old builds

4 participants