Skip to content

Commit 92a2598

Browse files
committed
Set cgit agefile using latest commit authordate on any ref
1 parent 5c88e29 commit 92a2598

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ansible/roles/git-mirrors/templates/update-mirrors.sh.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,13 @@ for repo in $FOUND_REPOS; do
1717
fi
1818
echo "Updated repository."
1919

20+
mkdir -p "info/web" || { echo "Error: Failed to create info/web directory in $repo"; exit 1; }
21+
22+
git for-each-ref \
23+
--sort=-authordate --count=1 \
24+
--format='%(authordate:iso8601)' \
25+
--exclude='refs/pull/*/merge' \
26+
> info/web/last-modified || { echo "Error: Failed to write last-modified file in $repo"; exit 1; }
27+
2028
cd -
2129
done

0 commit comments

Comments
 (0)