This commit fixes a subtle issue with pruning the old docs from docs-ci. We remove docs that are older than one week. However, we used the commit date instead of the authored date. Since we actually squash the old commits (that are older than four weeks) regularly, the commit date is always newer.
run: |
cd target
for file in `find ./ -maxdepth 1 -name "docs-*"`; do
- mod=`git log -1 HEAD --pretty="%ci" $file`
+ mod=`git log -1 HEAD --pretty="%ai" $file`
touch -d "$mod" $file
done
find ./ -maxdepth 1 -name "docs-*" -mtime +7 -exec git rm -r {} +