Skip to content

Commit

Permalink
Remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltaranto committed Feb 11, 2025
1 parent 74f42d2 commit 397b9fe
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/clean-up-previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,9 @@ jobs:

- name: Delete old preview directories
run: |
set -x
DATE_FROM_DAYS_AGO=`date --date="${{env.DAYS_OLD}} days ago" +"%Y"-"%m"-"%d" || date -v-${{env.DAYS_OLD}}d +"%Y"-"%m"-"%d"`;
echo "Days ago:"
echo $DATE_FROM_DAYS_AGO
echo "Preview dirs:"
echo $(find ${{ env.PREVIEW_DIR }} -mindepth 1 -maxdepth 1 -type d -print)
echo "Before commit:"
echo $(git log --before=$DATE_FROM_DAYS_AGO | tail -1)
DATE_FROM_DAYS_AGO=`date --date="${{env.DAYS_OLD}} days ago" +"%Y"-"%m"-"%d"`;
for i in $(find ${{ env.PREVIEW_DIR }} -mindepth 1 -maxdepth 1 -type d -print); do
echo "Git log before date:"
echo $(git log --before=$DATE_FROM_DAYS_AGO $i | tail -1)
if [[ $(git log --before=${DATE_FROM_DAYS_AGO} $i | tail -1) ]]; then
if [[ $(git log --before=$DATE_FROM_DAYS_AGO $i | tail -1) ]]; then
echo "Deleting directory $i"
rm -rf $i
fi
Expand Down

0 comments on commit 397b9fe

Please sign in to comment.